Missing error handling: consumer_signal_init should return its error status
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 18 Dec 2014 01:45:21 +0000 (20:45 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 7 Jan 2015 20:42:20 +0000 (15:42 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/consumer-timer.c
src/common/consumer-timer.h

index e7343afa63057d33333ea4bc9a4a187c663fed41..646d32342cdfa0a7a7552332dd3f5da2c90cc680 100644 (file)
@@ -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;
 }
 
 /*
index f3fac5d25d8ce791b0767f55bea5fb5d2f6f9d13..baaa82b04993a1ee1173ccb5fc5952555b1cb95c 100644 (file)
@@ -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 */
This page took 0.026359 seconds and 4 git commands to generate.