X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-ust-comm.c;h=b3567dda36f0c14042546f41d62656fcbadf79f0;hb=4c1ee94e5ef9ac3efb4a036108a9ff4eb24c238c;hp=86cce18d57fe658588db907ed8016f39e95f975f;hpb=e4486ebcdee39064492ed386b11008191fbbad17;p=lttng-ust.git diff --git a/liblttng-ust/lttng-ust-comm.c b/liblttng-ust/lttng-ust-comm.c index 86cce18d..b3567dda 100644 --- a/liblttng-ust/lttng-ust-comm.c +++ b/liblttng-ust/lttng-ust-comm.c @@ -22,6 +22,7 @@ #define _LGPL_SOURCE #include #include +#include #include #include #include @@ -45,7 +46,6 @@ #include #include "tracepoint-internal.h" #include "ltt-tracer-core.h" -#include "compat.h" /* * Has lttng ust comm constructor been called ? @@ -159,6 +159,7 @@ static int register_app_to_sessiond(int socket) { ssize_t ret; + int prctl_ret; struct { uint32_t major; uint32_t minor; @@ -177,7 +178,11 @@ int register_app_to_sessiond(int socket) reg_msg.uid = getuid(); reg_msg.gid = getgid(); reg_msg.bits_per_long = CAA_BITS_PER_LONG; - lttng_ust_getprocname(reg_msg.name); + prctl_ret = prctl(PR_GET_NAME, (unsigned long) reg_msg.name, 0, 0, 0); + if (prctl_ret) { + ERR("Error executing prctl"); + return -errno; + } ret = ustcomm_send_unix_sock(socket, ®_msg, sizeof(reg_msg)); if (ret >= 0 && ret != sizeof(reg_msg))