+ /*
+ * Block RT signals used for UST periodical metadata flush and the live
+ * timer in main, and create a dedicated thread to handle these signals.
+ */
+ consumer_signal_init();
+
+ ctx->type = opt_type;
+
+ /* Initialize communication library */
+ lttcomm_init();
+
+ ret = utils_create_pipe(health_quit_pipe);
+ if (ret < 0) {
+ goto error_health_pipe;
+ }
+
+ /* Create thread to manage the client socket */
+ ret = pthread_create(&health_thread, NULL,
+ thread_manage_health, (void *) NULL);
+ if (ret != 0) {
+ PERROR("pthread_create health");
+ goto health_error;
+ }
+
+ /* Create thread to manage channels */
+ ret = pthread_create(&channel_thread, NULL, consumer_thread_channel_poll,
+ (void *) ctx);
+ if (ret != 0) {
+ perror("pthread_create");
+ goto channel_error;
+ }
+