fprintf(fp, "Usage: %s OPTIONS\n\nOptions:\n", progname);
fprintf(fp, " -h, --help "
"Display this usage.\n");
fprintf(fp, "Usage: %s OPTIONS\n\nOptions:\n", progname);
fprintf(fp, " -h, --help "
"Display this usage.\n");
"Specify path for the error socket\n");
fprintf(fp, " -d, --daemonize "
"Start as a daemon.\n");
"Specify path for the error socket\n");
fprintf(fp, " -d, --daemonize "
"Start as a daemon.\n");
"Verbose mode. Activate DBG() macro.\n");
fprintf(fp, " -V, --version "
"Show version number.\n");
"Verbose mode. Activate DBG() macro.\n");
fprintf(fp, " -V, --version "
"Show version number.\n");
fprintf(fp, " -k, --kernel "
"Consumer kernel buffers (default).\n");
fprintf(fp, " -u, --ust "
fprintf(fp, " -k, --kernel "
"Consumer kernel buffers (default).\n");
fprintf(fp, " -u, --ust "
{ "consumerd-cmd-sock", 1, 0, 'c' },
{ "consumerd-err-sock", 1, 0, 'e' },
{ "daemonize", 0, 0, 'd' },
{ "consumerd-cmd-sock", 1, 0, 'c' },
{ "consumerd-err-sock", 1, 0, 'e' },
{ "daemonize", 0, 0, 'd' },
{ "help", 0, 0, 'h' },
{ "quiet", 0, 0, 'q' },
{ "verbose", 0, 0, 'v' },
{ "help", 0, 0, 'h' },
{ "quiet", 0, 0, 'q' },
{ "verbose", 0, 0, 'v' },
- c = getopt_long(argc, argv, "dhqvVku" "c:e:", long_options, &option_index);
+ c = getopt_long(argc, argv, "dhqvVku" "c:e:g:", long_options, &option_index);
+ /*
+ * Wait for health thread to be initialized before letting the
+ * sessiond thread reply to the sessiond that we are ready.
+ */
+ while (uatomic_read(<tng_consumer_ready)) {
+ usleep(100000);
+ }
+ cmm_smp_mb(); /* Read ready before following operations */
+
/* Create thread to manage channels */
ret = pthread_create(&channel_thread, NULL, consumer_thread_channel_poll,
(void *) ctx);
/* Create thread to manage channels */
ret = pthread_create(&channel_thread, NULL, consumer_thread_channel_poll,
(void *) ctx);