Fix UST SIGPIPE handling
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 14 Aug 2012 21:10:59 +0000 (17:10 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 14 Aug 2012 21:10:59 +0000 (17:10 -0400)
commit2c44f5b96c30c96daf1c4b988d7498b5ee5fc009
tree1d0b372cb7f806a51e813e94a478cd51bdc2e47e
parentfaebb41808b9deda5ef5dfea0c035077407e7f9f
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 <mathieu.desnoyers@efficios.com>
Acked-by: Christian Babeux <christian.babeux@efficios.com>
CC: David Goulet <dgoulet@efficios.com>
libringbuffer/frontend_internal.h
This page took 0.024855 seconds and 4 git commands to generate.