Fix: sessiond: ust-app: per-pid buffers: Create empty ust/ directory
[lttng-tools.git] / src / bin / lttng-sessiond / ust-app.c
index 856de63a3f24152d03944c003bfe28c890f4847a..58308dec801f0bef53dedada426ba7bd574e51e8 100644 (file)
@@ -6486,6 +6486,17 @@ enum lttng_error_code ust_app_create_channel_subdirectories(
        {
                struct ust_app *app;
 
+               /*
+                * Create the toplevel ust/ directory in case no apps are running.
+                */
+               chunk_status = lttng_trace_chunk_create_subdirectory(
+                               usess->current_trace_chunk,
+                               DEFAULT_UST_TRACE_DIR);
+               if (chunk_status != LTTNG_TRACE_CHUNK_STATUS_OK) {
+                       ret = LTTNG_ERR_CREATE_DIR_FAIL;
+                       goto error;
+               }
+
                cds_lfht_for_each_entry(ust_app_ht->ht, &iter.iter, app,
                                pid_n.node) {
                        struct ust_app_session *ua_sess;
This page took 0.024 seconds and 5 git commands to generate.