Port: Remove _GNU_SOURCE, defined in config.h
[lttng-tools.git] / src / bin / lttng-consumerd / lttng-consumerd.c
index 0d34feeb342904ddc599c84fbc7c7359ade16872..cd0fc73b2167781e600348c711307dc4bf4e2bd2 100644 (file)
@@ -16,7 +16,6 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#define _GNU_SOURCE
 #define _LGPL_SOURCE
 #include <fcntl.h>
 #include <getopt.h>
@@ -38,7 +37,6 @@
 #include <unistd.h>
 #include <sys/mman.h>
 #include <assert.h>
-#include <config.h>
 #include <urcu/compiler.h>
 #include <ulimit.h>
 
@@ -422,6 +420,10 @@ int main(int argc, char **argv)
                set_ulimit();
        }
 
+       if (run_as_create_worker(argv[0]) < 0) {
+               goto exit_init_data;
+       }
+
        /* create the consumer instance with and assign the callbacks */
        ctx = lttng_consumer_create(opt_type, lttng_consumer_read_subbuffer,
                NULL, lttng_consumer_on_recv_stream, NULL);
@@ -638,13 +640,14 @@ exit_init_data:
        if (health_consumerd) {
                health_app_destroy(health_consumerd);
        }
-exit_health_consumerd_cleanup:
+       /* Ensure all prior call_rcu are done. */
+       rcu_barrier();
 
-exit_options:
+       run_as_destroy_worker();
 
+exit_health_consumerd_cleanup:
+exit_options:
 exit_set_signal_handler:
-       /* Ensure all prior call_rcu are done. */
-       rcu_barrier();
 
        if (!retval) {
                exit(EXIT_SUCCESS);
This page took 0.024498 seconds and 4 git commands to generate.