[JDEV] FreeBSD and MIO

Keith Minkler keith at digix.dyndns.org
Fri Dec 8 00:55:09 CST 2000


Jdev,

I finnaly found the FreeBSD select(2) bug.. (well, my bug, not FreeBSD's) *G*

It has to do with differences in how linux and FreeBSD handle select(2) getting
interupted by a signal.  On Linux, it clears the FD sets you pass into it, but
on FreeBSD, it leaves the sets untouched.  (Thank GOD for man pages).  It is 
easily fixed by checking the return value of select(2), and not trying to read(2),
write(2), or accept(2) from the sockets on an error condition (-1) such as 
when the loop is signalled.

*phew*  with much joy, FreeBSD will be able to share in the 1.4 bliss, along with
the rest of the community.. *G*

Keith Minkler




More information about the JDev mailing list