< 10 hour makehistory.

Russ Allbery rra at stanford.edu
Thu Aug 17 22:55:08 UTC 2000


Katsuhiro Kondou <kondou at nec.co.jp> writes:
> list-inn-workers at news.cistron.nl (Miquel van Smoorenburg) wrote;

>> All the lseek(50, 0, SEEK_CUR) calls could and should be dropped- they
>> don't do anything.

> Buffindexed never calls lseek() for itself.  And I'm very curious why
> write() is called for writing overivew data, while overview index is
> written thru pwrite().  Buffindexed uses pwrite() for both.

lseek calls with a SEEK_CUR argument indicate that either your platform
doesn't have a native pwrite call or libc is emulating it; they're coming
from INN's pwrite emulation or something equivalent, which has to obtain
the current file offset so that it can restore it after doing the write.
lseek(fd, 0, SEEK_CUR) is the most portable way I know of getting the
current file offset.

-- 
Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>



More information about the inn-workers mailing list