Fix: call lttng_poll_set_max_size before start threads
[lttng-tools.git] / src / bin / lttng-sessiond / main.c
index 80eebf163a10af74b1edfdc1069ccd830050bdbb..5fcd540e5314bd5ab80b522e2627f5e9d96ea81d 100644 (file)
@@ -5205,6 +5205,12 @@ int main(int argc, char **argv)
                goto exit_ht_cleanup_pipe;
        }
 
+       /* Set up max poll set size */
+       if (lttng_poll_set_max_size()) {
+               retval = -1;
+               goto exit_set_max_size;
+       }
+
        /* Create thread to clean up RCU hash tables */
        ret = pthread_create(&ht_cleanup_thread, NULL,
                        thread_ht_cleanup, (void *) NULL);
@@ -5539,9 +5545,6 @@ int main(int argc, char **argv)
         */
        session_list_ptr = session_get_list();
 
-       /* Set up max poll set size */
-       lttng_poll_set_max_size();
-
        cmd_init();
 
        /* Check for the application socket timeout env variable. */
@@ -5771,6 +5774,7 @@ exit_init_data:
                retval = -1;
        }
 exit_ht_cleanup:
+exit_set_max_size:
 
        utils_close_pipe(ht_cleanup_pipe);
 exit_ht_cleanup_pipe:
This page took 0.023255 seconds and 4 git commands to generate.