From: Christian Brauner Date: Fri, 29 Jan 2021 13:26:15 +0000 (+0100) Subject: attach: use STDIN_FILENO instead of hard-coding 0 X-Git-Tag: lxc-5.0.0~313^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d2b46fbb8f1bca6cbaa68f2e1b56f7e84b0f6fd;p=thirdparty%2Flxc.git attach: use STDIN_FILENO instead of hard-coding 0 Signed-off-by: Christian Brauner --- diff --git a/src/lxc/attach.c b/src/lxc/attach.c index 1b47fdc81..2aa963104 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -1351,7 +1351,7 @@ int lxc_attach(struct lxc_container *container, lxc_attach_exec_t exec_function, TRACE("Received pid %d of attached process in parent pid namespace", attached_pid); /* Ignore SIGKILL (CTRL-C) and SIGQUIT (CTRL-\) - issue #313. */ - if (options->stdin_fd == 0) { + if (options->stdin_fd == STDIN_FILENO) { signal(SIGINT, SIG_IGN); signal(SIGQUIT, SIG_IGN); }