X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Frotation-thread.c;h=2b44036a2276c224b108fd26760d3063770660c9;hb=87380d40c7be8994dde5d804f035cb12c368b2c9;hp=af09ca0a5cb633bd04681ed382082b60689f7629;hpb=7fdbed1c109a618ee160018d121d5096dd14bd08;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/rotation-thread.c b/src/bin/lttng-sessiond/rotation-thread.c index af09ca0a5..2b44036a2 100644 --- a/src/bin/lttng-sessiond/rotation-thread.c +++ b/src/bin/lttng-sessiond/rotation-thread.c @@ -832,8 +832,7 @@ void *thread_rotation(void *data) int ret; struct rotation_thread_handle *handle = data; struct rotation_thread thread; - const int queue_pipe_fd = lttng_pipe_get_readfd( - handle->rotation_timer_queue->event_pipe); + int queue_pipe_fd; DBG("[rotation-thread] Started rotation thread"); @@ -842,6 +841,9 @@ void *thread_rotation(void *data) goto end; } + queue_pipe_fd = lttng_pipe_get_readfd( + handle->rotation_timer_queue->event_pipe); + rcu_register_thread(); rcu_thread_online(); @@ -914,7 +916,6 @@ void *thread_rotation(void *data) ret = lttng_read(fd, &buf, 1); if (ret != 1) { ERR("[rotation-thread] Failed to read from wakeup pipe (fd = %i)", fd); - ret = -1; goto error; } } else {