[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Thu, 14 Oct 2010 12:21:37 +0200
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:22.214.171.124) Gecko/20100918 Icedove/3.0.8
On 09/10/2010 21:00, Roland McGrath wrote:
> I think it would be reasonable to change the specification for io_read to
> say that the offset parameter must be exactly (off_t)-1 for a nonseekable
> io object, and that otherwise it must fail with ESPIPE. We might need to
> audit the existing uses to make sure there aren't uses that would violate
> this new rule, but that's probably not too hard to find and fix up.
> Under POSIX, any negative argument to pread is invalid and so the pread
> function can diagnose that without making any RPC. Then, pread will call
> io_read with its nonnegative argument, and this will get ESPIPE from the io
> server for a nonseekable object.
It would probably be the best solution. I've been looking up io_read()
uses, and I couldn't find one where this new rule would break things.
Shouldn't we change io_write() too? It would seem strange to me that
io_read() now returns ESPIPE for nonseekable objects while io_write()
Description: OpenPGP digital signature