O_NDELAY versus O_NONBLOCK
Tue Sep 5 11:34:00 GMT 2000
Joel Sherrill wrote:
> Chris Faylor wrote:
> > On Sun, Sep 03, 2000 at 01:15:13PM -0500, Joel Sherrill wrote:
> > >
> > >Simple question. They have different values in newlib but
> > >appear to have the same meaning. Under Linux, they have
> > >the same value.
> > >
> > >What should newlib do? If they are supposed to be treated semantically
> > >the same, then can they be the same value?
> > That's a good question. I notice that cygwin sporadically attempts to test
> > both values but it isn't consistent.
> This is the same thing inside RTEMS. I started tracked down a
> problem with fcntl and it turned out to be that the path did not
> check one of the part.
> > Having them equal makes sense to me.
> In starting to fix this, I came across another similar constant --
> FNBIO. I don't even see it in the Linux headers, so it can't
> be that important. :) Regardless, should this one be the same
> value as well -- or does it have different semantics?
> Regardless, attached is a patch that makes O_NDELAY and O_NONBLOCK
> the same.
> 2000-09-05 Joel Sherrill <joel@OARcorp.com>
> * libc/include/fcntl.h: Make O_NDELAY and O_NONBLOCK
> have the same value.
I have checked in a patch. I changed it so _FNDELAY equals _FNONBLOCK
like the Linux version does.
-- Jeff Johnston (Red Hat Inc)
More information about the Newlib