From: Jérémie Galarneau Date: Sat, 23 Nov 2019 00:20:22 +0000 (-0500) Subject: relayd: close stdin on launch X-Git-Tag: v2.12.0-rc1~228 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=c04077180977834684b367f97afa22a79fcbd471 relayd: close stdin on launch The relay daemon has no use for the standard input; it can be safely closed early on launch. Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-relayd/main.c b/src/bin/lttng-relayd/main.c index 325be9cf1..6e5b612f2 100644 --- a/src/bin/lttng-relayd/main.c +++ b/src/bin/lttng-relayd/main.c @@ -3800,6 +3800,12 @@ int main(int argc, char **argv) goto exit_options; } + ret = fclose(stdin); + if (ret) { + PERROR("Failed to close stdin"); + goto exit_options; + } + /* Try to create directory if -o, --output is specified. */ if (opt_output_path) { if (*opt_output_path != '/') {