Fix: consumer err_sock cloexec
[lttng-tools.git] / src / bin / lttng-sessiond / main.c
index acdddffdb0c198f6c406d8faa4aab554b3ab2035..b42535c6432d95b007a269bad9da09a35f22cfa2 100644 (file)
@@ -4077,6 +4077,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.023626 seconds and 4 git commands to generate.