]> git.ipfire.org Git - thirdparty/lxc.git/commit
start: Detect early failure of the new child
authorRichard Weinberger <richard@nod.at>
Tue, 16 Apr 2013 21:42:23 +0000 (23:42 +0200)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 17 Apr 2013 16:20:37 +0000 (18:20 +0200)
commit5a5c35c3a01afec515e688c8366e6f893985518d
tree70a9aee1a75fd886e12a593f1bad1a40ed4032f1
parent6b28a086310b8715f4655446f4c01d9555ef1786
start: Detect early failure of the new child

If the process in the new namespace dies very early
we have currently no chance to detect this.
The parent process will just die due to SIGPIPE
if it write to the fd used for synchronisation and
nobody will notice the real cause of the problem.

Install a SIGCHLD handler to detect the death.
Later when the child does execve() to the init within
the new namespace the handler will be disabled automatically.

Signed-off-by: Richard Weinberger <richard@nod.at>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/lxc/start.c