[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pread()

From: Roland McGrath
Subject: Re: pread()
Date: Sat, 9 Oct 2010 12:01:27 -0700 (PDT)

> Manuel Menal, le Sat 09 Oct 2010 20:40:26 +0200, a écrit :
> > There should be a way to check if the object is seekable or not before
> > calling io_read(), so pread() can return an error. But there is no
> > io_seekable() RPC, and calling io_seek() seems wrong to me, since
> > pread() is supposed not to change the file offset.
> Can't io_seek be called with SEEK_CUR, 0, thus not changing the file
> offset?

Yes, it can.  But pread making two RPCs rather than one would defeat half
the purpose of its existence.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]