From a24f05ab8afe43b1122d1fd6a4f4346443e0084a Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 10 Jul 2013 15:39:54 -0400 Subject: [PATCH] Fix: consumer err_sock cloexec Signed-off-by: Mathieu Desnoyers Signed-off-by: David Goulet --- src/bin/lttng-sessiond/main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 91e085290..048c1e16d 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -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); -- 2.34.1