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() ignores it. Thanks, -- Manuel Menal
signature.asc
Description: OpenPGP digital signature