Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
Description
The TcpClient class lacks EINTR/EAGAIN handling. EINTR is triggered when a child process exits because the parent receives a SIGCHLD. It is possible to simply ignore the signal but in a library you don't know if the process you live in does that.
So if in doubt, all POSIX calls documented to be interruptable need to be wrapped in do ... while(errno == EINTR).
Things are slightly different for WSAEINTR on Windows: Windows has no SIGCHLD. It does have other reasons why system calls can get interrupted in a similar fashion though and that's why they have the same error code, the reason for the interrupt differs though.