X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=libust%2Ftracectl.c;h=2f45d6be5d66fe249a197135e178755af33c597a;hb=0f79e1ef1d4f31a91476f5a84e367f2c49ce4723;hp=9634f2270d58790cf088ef69e39b63e664ca5956;hpb=f36c12ab311c7db808bfeda93bb95022020110cd;p=ust.git diff --git a/libust/tracectl.c b/libust/tracectl.c index 9634f22..2f45d6b 100644 --- a/libust/tracectl.c +++ b/libust/tracectl.c @@ -21,6 +21,7 @@ */ #define _GNU_SOURCE +#define _LGPL_SOURCE #include #include #include @@ -112,7 +113,10 @@ static void print_ust_marker(FILE *fp) (*iter.ust_marker)->name, (int)(*iter.ust_marker)->state, (*iter.ust_marker)->format, - (*iter.ust_marker)->location); + NULL); /* + * location is null for now, will be added + * to a different table. + */ ust_marker_iter_next(&iter); } unlock_ust_marker(); @@ -1224,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");