X-Git-Url: http://git.lttng.org/?p=ust.git;a=blobdiff_plain;f=libust%2Ftracectl.c;fp=libust%2Ftracectl.c;h=2f45d6be5d66fe249a197135e178755af33c597a;hp=bc0a07c046d26333f36ef1b19145f79c8ba53fa8;hb=0f79e1ef1d4f31a91476f5a84e367f2c49ce4723;hpb=317117239797a3609c1ec817a59bb3e70c9c1cba diff --git a/libust/tracectl.c b/libust/tracectl.c index bc0a07c..2f45d6b 100644 --- a/libust/tracectl.c +++ b/libust/tracectl.c @@ -1228,12 +1228,19 @@ static struct ustcomm_sock * init_app_socket(int epoll_fd) char *dir_name, *sock_name; int result; struct ustcomm_sock *sock = NULL; + time_t mtime; dir_name = ustcomm_user_sock_dir(); if (!dir_name) return NULL; - result = asprintf(&sock_name, "%s/%d", dir_name, (int)getpid()); + mtime = ustcomm_pid_st_mtime(getpid()); + if (!mtime) { + goto free_dir_name; + } + + result = asprintf(&sock_name, "%s/%d.%ld", dir_name, + (int) getpid(), (long) mtime); if (result < 0) { ERR("string overflow allocating socket name, " "UST thread bailing");