X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-consumerd%2Flttng-consumerd.c;h=1373a74b28212d5595d8c4f0dc18a89938e6a616;hp=1636b9c0d22777798ff220df010c4bc5ca6c9634;hb=0072e5e28fb5f18daffb930be7efd55d2474e6ad;hpb=b6d4654aed5d8661ef4ccba1b4d6967c89dd5c65 diff --git a/src/bin/lttng-consumerd/lttng-consumerd.c b/src/bin/lttng-consumerd/lttng-consumerd.c index 1636b9c0d..1373a74b2 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;