Is it OK to poll() a device file descriptor

Is it OK to poll() a device file descriptor

Oleg Goldshmidt pub at goldshmidt.org
Tue Jun 18 18:09:56 IDT 2013


Elazar Leibovich <elazarl at gmail.com> writes:

> Try to open /dev/null, and then to poll the file descriptor. Neither
> in the man page nor in the standard I see anything preventing you to
> poll on /dev/null, yet, it does not work on Mac OS X. You get a
> POLLNVAL.

>From http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man2/poll.2.html:

BUGS
     The poll() system call currently does not support devices.

Your code works fine on Linux, but I suppose you know that.

-- 
Oleg Goldshmidt | pub at goldshmidt.org



More information about the Linux-il mailing list