Subject: Re: O_NONBLOCK in a character device driver
To: None <explorer@flame.org>
From: Andreas Gustafsson <gson@araneus.fi>
List: tech-kern
Date: 08/17/1997 14:19:00
In <19970815084839.1302.qmail@kechara.flame.org> explorer@flame.org said:
> I'm having some problems using O_NONBLOCK in a character device
> driver. It seems that the fcntl(fd, F_SETFL, O_NONBLOCK) call
> returns 0 for no error, but the flags are not being passed to
> the read routine correctly.
> ...
> The problem is, O_NONBLOCK is defined to be 0x00000004, which most certainly
> is not 0x10.
You need to make the driver mask with IO_NDELAY instead of O_NONBLOCK.
As to why two different bits are used, I don't know.
--
Andreas Gustafsson, gson@araneus.fi