The UNIX system call "send()" sends SIGPIPE signal when the socket breaks while sending data. The default handling of SIGPIPE is terminating the program on the most platforms, and we have to handle this signal.
The sending error itself is handled in the program so we can just ignore SIGPIPE signal. The attached patch makes system ignore SIGPIPE signal to prevent meaningless program termination.
Please note that Windows does not have SIGPIPE and I excluded the code using macros.
Maybe this is my problem too
Quoteprevent meaningless program termination.
Thanks, in r9029.