X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-app.c;h=8c9277cae225ea80e9df7bf106d304a529e71769;hp=e01d43caf024ec61f3311ad323c4d3f7254afade;hb=940c4592b53105b7c308f8e32b8da136b3d6533d;hpb=3050aa9225f10e1dbd362c9c96f85ccca684128b diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c index e01d43caf..8c9277cae 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.c @@ -1832,15 +1832,12 @@ static void shadow_copy_channel(struct ust_app_channel *ua_chan, static void shadow_copy_session(struct ust_app_session *ua_sess, struct ltt_ust_session *usess, struct ust_app *app) { - time_t rawtime; struct tm *timeinfo; char datetime[16]; int ret; char tmp_shm_path[PATH_MAX]; - /* Get date and time for unique app path */ - time(&rawtime); - timeinfo = localtime(&rawtime); + timeinfo = localtime(&app->registration_time); strftime(datetime, sizeof(datetime), "%Y%m%d-%H%M%S", timeinfo); DBG2("Shadow copy of session handle %d", ua_sess->handle); @@ -3377,6 +3374,8 @@ void ust_app_add(struct ust_app *app) assert(app); assert(app->notify_sock >= 0); + app->registration_time = time(NULL); + rcu_read_lock(); /*