Unexpected soft update inconsistency

Cedric Berger cedric at berger.to
Mon Jun 12 01:19:01 PDT 2006

Matthew Dillon wrote:

:    (2) new system call entry points for non-blocking read and write, then
:	libc_r can completely ignore FNONBLOCK and just use the new entry
:	points.
:    Otherwise this little problem is going to bite us over and over again
:    as time passes.
:    I'm thinking (2) might be the only real solution.
    Something like this:

    nbpread(int d, void *buf, size_t nbytes, off_t offset)
    nbpread(int d, const void *buf, size_t nbytes, off_t offset)
    (same arguments as pread/pwrite).  offset can be -1, indicating that the
    current offset should be used and updated.  The function would perform
    the operation non-blocking regardless of the non blocking setting on the
    file pointer.
    libc_r would then use the new entry points and would not mess with
    the non-blocking flag on the FP at all.
That would be fantastic.

I've banged my head with this problem often enough.

And I'm not the only one, of course:



More information about the Bugs mailing list