On Linux, send service call of Socket occurs SIGPILE signal if a socket to use has broken when it sends any. Process which receive the signal is down instantly by default.
MSG_NOSIGNAL parameter of the send() can suppress the signal. In this case, the send returns EPIPE error instead of the SIGPIPE.
Or, signal service call can ignore the signal: signal(SIGPIPE, SIG_IGN); But, GDB catch the signal and break the process on debugging in this case.
On Windows, the MSG_NOSIGNAL is not provided.... I see, it may be caused as Windows seems to support signals just little.
No comments:
Post a Comment