|
From: Camille T. <ca...@os...> - 2011-09-28 17:43:50
|
Hi dear list, I was surprised to learn that on Mac OS X, MSG_NOSIGNAL is ignored. The code in send.c at lines 419, 439 and 442 — typically something like ret = send(sock, data, data_len, MSG_NOSIGNAL); — causes a SIGPIPE, ultimately crashing the application. The solution I found, is to either block or implement a handler for the SIGPIPE signal, for example: signal(SIGPIPE, SIG_IGN); All the best, Cam |