Fix: consumer err_sock cloexec
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 10 Jul 2013 19:39:54 +0000 (15:39 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Wed, 10 Jul 2013 22:17:40 +0000 (18:17 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
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.028573 seconds and 4 git commands to generate.