Bang Jun-Young bjy@mogua.org writes:
According to the manpage, NetBSD implementation of poll(2) is different from historical one in that a given fd may not cause poll to return with an error. I'm not sure if this is the case, however.
I'm not sure I understand what they mean in the manpage. Could you write a small test program to determine the exact behavior WRT invalid fds? Particularly interesting would be to determine if poll actually sleeps waiting for something, or if it returns POLLNVAL at once.
On Fri, May 18, 2001 at 02:10:51PM -0700, Alexandre Julliard wrote:
I'm not sure I understand what they mean in the manpage. Could you write a small test program to determine the exact behavior WRT invalid fds? Particularly interesting would be to determine if poll actually sleeps waiting for something, or if it returns POLLNVAL at once.
It has been observed that poll always returns POLLNVAL without waiting when fd is -1.
Jun-Young