Introduce LTTNG_UST_LOADED environment variable
[lttng-ust.git] / liblttng-ust / lttng-ust-comm.c
index 6105403a25d032b618df9c6202644ff138a0a034..cc9b6b5e1e8706a1b941de1b0d09ea37dddaffd3 100644 (file)
@@ -1547,6 +1547,13 @@ void lttng_ust_malloc_wrapper_init(void)
 {
 }
 
+static
+void init_ust_env(void)
+{
+       if (putenv("LTTNG_UST_LOADED=1"))
+               DBG("Error setting LTTNG_UST_LOADED environment variable");
+}
+
 /*
  * sessiond monitoring thread: monitor presence of global and per-user
  * sessiond by polling the application common named pipe.
@@ -1574,6 +1581,8 @@ void __attribute__((constructor)) lttng_ust_init(void)
        lttng_fixup_procname_tls();
        lttng_fixup_ust_mutex_nest_tls();
 
+       init_ust_env();
+
        /*
         * We want precise control over the order in which we construct
         * our sub-libraries vs starting to receive commands from
This page took 0.023462 seconds and 4 git commands to generate.