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:12:53 +0000 (17:12 -0400)
commit69b8d2fae1590ec792409587123afa55b8959c07
treebb7b3e20060215d79f375a5bdada65b88ca4da77
parent9834ab89cc80136e2e9f955ccd7037422dc2544a
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.024706 seconds and 4 git commands to generate.