]> git.proxmox.com Git - mirror_lxc.git/commit - src/lxc/conf.h
execute: ensure parent is notified about child exec and close all unneeded fds
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 29 Jun 2021 08:32:31 +0000 (10:32 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 29 Jun 2021 09:20:55 +0000 (11:20 +0200)
commit734a677ed22e8adfbcbc66b30763f9da9279cc39
tree731d46b30b0f4684c0b9fe97241bfacd810df2ad
parenta1150aa174c9b352548fd5273805a680ea6e511a
execute: ensure parent is notified about child exec and close all unneeded fds

lxc_container_init() creates the container payload process as it's child
so lxc_container_init() itself never really exits and thus the parent
isn't notified about the child exec'ing since the sync file descriptor
is never closed. Make sure it's closed to notify the parent about the
child's exec.

In addition we're currently leaking all file descriptors associated with
the handler into the stub init. Make sure that all file descriptors
other than stderr are closed.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/conf.h
src/lxc/initutils.c