Skip to main content
1 of 2

You pass &tmp_input to select but then pass &input to the FD_ISSETs. These two fd_set objects are different. The input fd_set is set once, so FD_ISSET may well lie to you and your reads will fail. I am surprised no one saw this.

stuart