health_code_update();
- if (!revents) {
- /* No activity for this FD (poll implementation). */
- continue;
- }
-
/* Thread quit pipe has been closed. Killing thread. */
if (pollfd == quit_pipe_read_fd) {
err = 0;
health_code_update();
/*
- * Transfer the write-end of the channel monitoring and rotate pipe
- * to the consumer by issuing a SET_CHANNEL_MONITOR_PIPE command.
+ * Transfer the write-end of the channel monitoring pipe to the consumer
+ * by issuing a SET_CHANNEL_MONITOR_PIPE command.
*/
cmd_socket_wrapper = consumer_allocate_socket(&consumer_data->cmd_sock);
if (!cmd_socket_wrapper) {
}
cmd_socket_wrapper->lock = &consumer_data->lock;
+ pthread_mutex_lock(cmd_socket_wrapper->lock);
+ ret = consumer_init(cmd_socket_wrapper, sessiond_uuid);
+ if (ret) {
+ ERR("Failed to send sessiond uuid to consumer daemon");
+ mark_thread_intialization_as_failed(notifiers);
+ pthread_mutex_unlock(cmd_socket_wrapper->lock);
+ goto error;
+ }
+ pthread_mutex_unlock(cmd_socket_wrapper->lock);
+
ret = consumer_send_channel_monitor_pipe(cmd_socket_wrapper,
consumer_data->channel_monitor_pipe);
if (ret) {
health_code_update();
- if (!revents) {
- /* No activity for this FD (poll implementation). */
- continue;
- }
-
/*
* Thread quit pipe has been triggered, flag that we should stop
* but continue the current loop to handle potential data from
wait_until_thread_is_ready(notifiers);
lttng_thread_put(thread);
if (notifiers->initialization_result) {
- goto error;
+ return false;
}
return true;
error: