From: Mathieu Desnoyers Date: Wed, 10 Jul 2013 19:39:54 +0000 (-0400) Subject: Fix: consumer err_sock cloexec X-Git-Tag: v2.2.1~1 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=12c30c08d4c4893ae6f7d559125b2e7b95691c70;p=lttng-tools.git Fix: consumer err_sock cloexec Signed-off-by: Mathieu Desnoyers Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index acdddffdb..b42535c64 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -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);