From: Mathieu Desnoyers Date: Tue, 14 Aug 2012 21:10:59 +0000 (-0400) Subject: Fix UST SIGPIPE handling X-Git-Tag: v2.1.0-rc1~13 X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=2c44f5b96c30c96daf1c4b988d7498b5ee5fc009;hp=2c44f5b96c30c96daf1c4b988d7498b5ee5fc009;p=lttng-ust.git Fix UST SIGPIPE handling When the consumerd dies (from a SIGKILL), it may close all of its file descriptors rather abruptly. We ensured that the UST command threads have all signals blocked, and they use MSG_NOSIGNAL when sending messages to the sessiond over sockets. However, the consumer scheme uses a pipe(2) to transport the "wakeup" info from the application tracing site to the consumer daemon. It may send a SIGPIPE to the application in that case, which could kill the application, an unwanted side-effect. Block thread SIGPIPE around write() and wait for the signal to fix this. Signed-off-by: Mathieu Desnoyers Acked-by: Christian Babeux CC: David Goulet ---