<div dir="ltr"><div dir="ltr"><div>The docs for select() says:<br></div><div dir="ltr"><br></div><div dir="ltr"> Under Linux, select() may report a socket file descriptor as <br></div><div dir="ltr">"ready for reading", while nevertheless a subsequent  read <br></div><div dir="ltr">blocks.  This could for example happen when data has arrived <br></div><div dir="ltr">but upon examination has wrong checksum and is discarded.  <br></div><div dir="ltr">There may be other circumstances in which a file descriptor is  <br></div><div dir="ltr">spuriously reported as ready.  Thus it may be safer to use <br></div><div dir="ltr">O_NONBLOCK on sockets that should not block.<br></div><div dir="ltr"><br></div><div>I was thinking that poll() is also similarly afflicted on Linux, but</div><div>the docs for poll() don't mention anything similar.  Does anyone</div><div>know if poll() used to have the problem, but no longer does</div><div>or if it does, but the docs fail to mention it?</div><div><br></div><div>I was using poll() in this program:</div><div><a href="https://github.com/Ebenezer-group/onwards/blob/master/src/cmw/tiers/genz.cc">https://github.com/Ebenezer-group/onwards/blob/master/src/cmw/tiers/genz.cc</a></div><div><br></div><div>but decided I could do without it recently.  Part of my</div><div>decision was based on thinking that poll() suffered from</div><div>the same problem as select().   This problem with <br></div><div>select() has existed for years on LInux.  I'm not sure why <br></div><div>they don't fix it.  FreeBSD doesn't have this problem.<br></div><div><br></div><div>Also would like to mention that I recently learned that</div><div>GhostBSD doesn't have any firewall options apparently.<br></div><div>Recently I started using GhostBSD and have liked it, but <br></div><div>even more recently found this out.  One good thing about <br></div><div>TrueOS is they incorporate a firewall.<br></div><div><br></div><div><br></div><div>Brian</div><div>Ebenezer Enterprises - In G-d we trust.</div><div><a href="http://webEbenezer.net">http://webEbenezer.net</a><br></div></div></div>