From c7a2deb2dcd0abb8e4619285a84892a45d4af961 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Tue, 8 May 2018 17:58:36 +0200 Subject: [PATCH] execute: do not check inherited fds again This is already done in do_lxcapi_start{l}() so a) no need to do it again here and b) this would close the state socket pair sockets, corrup the fd, and lead to EBADF. Signed-off-by: Christian Brauner --- src/lxc/execute.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/lxc/execute.c b/src/lxc/execute.c index c7320ab2d..d2a6edc64 100644 --- a/src/lxc/execute.c +++ b/src/lxc/execute.c @@ -116,9 +116,6 @@ int lxc_execute(const char *name, char *const argv[], int quiet, { struct execute_args args = {.argv = argv, .quiet = quiet}; - if (lxc_check_inherited(handler->conf, false, &handler->conf->maincmd_fd, 1)) - return -1; - handler->conf->is_execute = 1; return __lxc_start(name, handler, &execute_start_ops, &args, lxcpath, backgrounded, error_num); -- 2.47.2