Subject: Re: O_NONBLOCK in a character device driver
To: None <firstname.lastname@example.org>
From: Andreas Gustafsson <email@example.com>
Date: 08/17/1997 14:19:00
In <firstname.lastname@example.org> email@example.com 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, firstname.lastname@example.org