Rename uuid.h wrapper to lttng-ust-uuid.h
[lttng-ust.git] / liblttng-ust / lttng-ust-comm.c
index 516e39d2f570c6837352ccedb23bd798bbb1b3b0..d0641c5c6e510b01d0538d9c36b07c5c430644c6 100644 (file)
@@ -22,7 +22,6 @@
 #define _LGPL_SOURCE
 #include <sys/types.h>
 #include <sys/socket.h>
-#include <sys/prctl.h>
 #include <sys/mman.h>
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -46,6 +45,7 @@
 #include <usterr-signal-safe.h>
 #include "tracepoint-internal.h"
 #include "ltt-tracer-core.h"
+#include "compat.h"
 
 /*
  * Has lttng ust comm constructor been called ?
@@ -159,7 +159,6 @@ static
 int register_app_to_sessiond(int socket)
 {
        ssize_t ret;
-       int prctl_ret;
        struct {
                uint32_t major;
                uint32_t minor;
@@ -178,11 +177,7 @@ int register_app_to_sessiond(int socket)
        reg_msg.uid = getuid();
        reg_msg.gid = getgid();
        reg_msg.bits_per_long = CAA_BITS_PER_LONG;
-       prctl_ret = prctl(PR_GET_NAME, (unsigned long) reg_msg.name, 0, 0, 0);
-       if (prctl_ret) {
-               ERR("Error executing prctl");
-               return -errno;
-       }
+       lttng_ust_getprocname(reg_msg.name);
 
        ret = ustcomm_send_unix_sock(socket, &reg_msg, sizeof(reg_msg));
        if (ret >= 0 && ret != sizeof(reg_msg))
@@ -340,7 +335,9 @@ end:
        }
        /*
         * We still have the memory map reference, and the fds have been
-        * sent to the sessiond. We can therefore close those fds.
+        * sent to the sessiond. We can therefore close those fds. Note
+        * that we keep the write side of the wait_fd open, but close
+        * the read side.
         */
        if (lur.ret_code == USTCOMM_OK) {
                switch (lum->cmd) {
This page took 0.027816 seconds and 4 git commands to generate.