Revert "rexec: mark all fds as close-on-exec if possible"

This reverts commit 531d36ad. Callers might want to explicilty inhert file descriptors so we can't close them behind their back when we exec. Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 0b8e876f
......@@ -162,9 +162,6 @@ static void lxc_rexec_as_memfd(char **argv, char **envp, const char *memfd_name)
if (execfd < 0)
return;
ret = close_range(STDERR_FILENO + 1, MAX_FILENO, CLOSE_RANGE_CLOEXEC);
if (ret && (errno != ENOSYS && errno != EINVAL))
fprintf(stderr, "%m - Failed to mark all file descriptors as close-on-exec\n");
fexecve(execfd, argv, envp);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment