From: Mathieu Desnoyers Date: Thu, 18 Dec 2014 01:45:21 +0000 (-0500) Subject: Missing error handling: consumer_signal_init should return its error status X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=commitdiff_plain;h=73664f816b1512231bf44679eea5a3c91ca619ec Missing error handling: consumer_signal_init should return its error status Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau --- 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 */