<div dir="ltr">Damn I missed that.<div><br></div><div>To my defense, this bug should be also mentioned in the POLLNVAL section. As it stands now, it looks like the only reason for POLLNVAL is a closed file descriptor.</div>
<div><br></div><div style>Sorry and thanks.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 18, 2013 at 6:09 PM, Oleg Goldshmidt <span dir="ltr"><<a href="mailto:pub@goldshmidt.org" target="_blank">pub@goldshmidt.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">Elazar Leibovich <<a href="mailto:elazarl@gmail.com">elazarl@gmail.com</a>> writes:<br>
<br>
> Try to open /dev/null, and then to poll the file descriptor. Neither<br>
> in the man page nor in the standard I see anything preventing you to<br>
> poll on /dev/null, yet, it does not work on Mac OS X. You get a<br>
> POLLNVAL.<br>
<br>
</div>From <a href="http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man2/poll.2.html" target="_blank">http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man2/poll.2.html</a>:<br>
<br>
BUGS<br>
The poll() system call currently does not support devices.<br>
<br>
Your code works fine on Linux, but I suppose you know that.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Oleg Goldshmidt | <a href="mailto:pub@goldshmidt.org">pub@goldshmidt.org</a><br>
</font></span></blockquote></div><br></div>