From 73664f816b1512231bf44679eea5a3c91ca619ec Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 17 Dec 2014 20:45:21 -0500 Subject: [PATCH] Missing error handling: consumer_signal_init should return its error status MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- src/common/consumer-timer.c | 4 +++- src/common/consumer-timer.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/common/consumer-timer.c b/src/common/consumer-timer.c index e7343afa6..646d32342 100644 --- a/src/common/consumer-timer.c +++ b/src/common/consumer-timer.c @@ -460,7 +460,7 @@ void consumer_timer_live_stop(struct lttng_consumer_channel *channel) * Block the RT signals for the entire process. It must be called from the * consumer main before creating the threads */ -void consumer_signal_init(void) +int consumer_signal_init(void) { int ret; sigset_t mask; @@ -471,7 +471,9 @@ void consumer_signal_init(void) if (ret) { errno = ret; PERROR("pthread_sigmask"); + return -1; } + return 0; } /* diff --git a/src/common/consumer-timer.h b/src/common/consumer-timer.h index f3fac5d25..baaa82b04 100644 --- a/src/common/consumer-timer.h +++ b/src/common/consumer-timer.h @@ -50,6 +50,6 @@ void consumer_timer_live_start(struct lttng_consumer_channel *channel, int live_timer_interval); void consumer_timer_live_stop(struct lttng_consumer_channel *channel); void *consumer_timer_thread(void *data); -void consumer_signal_init(void); +int consumer_signal_init(void); #endif /* CONSUMER_TIMER_H */ -- 2.34.1