bug-hurd
[Top][All Lists]
Advanced

[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:00:41 -0700 (PDT)

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.


Thanks,
Roland



reply via email to

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