X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-consumerd%2Flttng-consumerd.c;h=079bd60240ef2ac864a51e05c755423c78b9ddf0;hb=e0b31a80470c6400daa4cd62dd56d3542f031251;hp=00660fcd6a7d401aa3096236026eabd1900d5f64;hpb=ee6cec18ece7805b1966cbaefdfdaa32e123ec60;p=lttng-tools.git diff --git a/src/bin/lttng-consumerd/lttng-consumerd.c b/src/bin/lttng-consumerd/lttng-consumerd.c index 00660fcd6..079bd6024 100644 --- a/src/bin/lttng-consumerd/lttng-consumerd.c +++ b/src/bin/lttng-consumerd/lttng-consumerd.c @@ -99,14 +99,6 @@ static void sighandler(int sig) return; } - /* - * Ignore SIGPIPE because it should not stop the consumer whenever a - * SIGPIPE is caught through a FD operation. - */ - if (sig == SIGPIPE) { - return; - } - if (ctx) { lttng_consumer_should_exit(ctx); } @@ -127,9 +119,10 @@ static int set_signal_handler(void) return ret; } - sa.sa_handler = sighandler; sa.sa_mask = sigset; sa.sa_flags = 0; + + sa.sa_handler = sighandler; if ((ret = sigaction(SIGTERM, &sa, NULL)) < 0) { PERROR("sigaction"); return ret; @@ -140,6 +133,7 @@ static int set_signal_handler(void) return ret; } + sa.sa_handler = SIG_IGN; if ((ret = sigaction(SIGPIPE, &sa, NULL)) < 0) { PERROR("sigaction"); return ret;