> 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 suppose
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
thi
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 c
Hello,
It seems the Hurd implementation of pread() is not POSIX-compliant.
POSIX stipulates that "An attempt to perform a pread() on a file that is
incapable of seeking shall result in an error"[0]. But the Hurd pread()
ignores the offset parameter.
The reason is quite simple: pread() passes the