On 05/01/2017 11:52, Garrett D'Amore wrote:
TCP works now. OMG, close() vs. accept() is such a non-portable
nightmare. I almost went down the path of pthread cancellation.
Thankfully, that crisis is now averted. I never realized just how
broken the use of UNIX file descriptors in the face of close() and
multiple threads really are. But its working now . Thank goodness for
shutdown(2) and dup2().