This adds a new env var for identifying the internal sync pipe that
libcontainer uses to sync with the container and parent process. This
replaces #496 to allow the user to add additional files to the processes
and not take over fd 3 for all containers.
Closes#496
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
For some reason when the supervisor of a container is PID1 the parent
death signal was being delivered to the container's init process even if
it did not die. Also the ppid() will return 1 for a container running
in the pid namespace of it's parent and the parent is pid1.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
We only have libcontainer.Container on Docker side, can't change `config`
in linuxContainer, pass config to libcontainer so we can change config of
container.
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
currently genericError constructors require not-nil error to be able to read
its Error() message
Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com>
I think this is more convenient because for working with namespaces we
using configs.NamespaceType.
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Currently we have a problem when buffers are used for std file
descriptors. These buffers are filled from goroutines (Cmd.goroutine),
and we need to wait them to be sure that all data have been copied.
Signed-off-by: Andrew Vagin <avagin@openvz.org>