]> git.ipfire.org Git - thirdparty/lxc.git/commit
lxc-execute to return exit code of its child not others
authorMichel Normand <normand@fr.ibm.com>
Thu, 25 Jun 2009 09:21:56 +0000 (11:21 +0200)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Thu, 25 Jun 2009 09:21:56 +0000 (11:21 +0200)
commit37c3dfc9c974a6c42716c66e8d3c286f2441da44
treec423da71161444fa86bb77a81f204b6be0ec4f5e
parent7cbfc4e4411b6effc6a64fd83a8cb37ffc9c7155
lxc-execute to return exit code of its child not others

lxc-execute has to return the exit code of it's child not others
as today's code would return the exit code of the last child.
We need to track the first process we launched and store its
exit status when it exits. In order to avoid to detect the exit
of this pid several time if the pids number wrap, we put an extra
flag saying the process group is orhpan.

Signed-off-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/lxc_init.c