Fix: consumer err_sock cloexec
[lttng-tools.git] / src / bin / lttng-sessiond / main.c
index 91e085290eb1221dc62cb801e0fd0fafe984eabb..048c1e16d83feb66ff4c499470189e655e163727 100644 (file)
@@ -4145,6 +4145,16 @@ static int set_consumer_sockets(struct consumer_data *consumer_data,
                goto error;
        }
 
+       /*
+        * Set the CLOEXEC flag. Return code is useless because either way, the
+        * show must go on.
+        */
+       ret = utils_set_fd_cloexec(consumer_data->err_sock);
+       if (ret < 0) {
+               PERROR("utils_set_fd_cloexec");
+               /* continue anyway */
+       }
+
        /* File permission MUST be 660 */
        ret = chmod(consumer_data->err_unix_sock_path,
                        S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
This page took 0.024 seconds and 5 git commands to generate.