From: Dave Reisner Date: Thu, 2 May 2013 14:39:53 +0000 (-0400) Subject: nspawn: inherit the exit status of container X-Git-Tag: v203~43 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=a5f5f8a07743bb9aa31fa361c90fce8d4a62388e;p=elogind.git nspawn: inherit the exit status of container If we get as far as successfully starting the container, nspawn should inherit the exit status of the child container process as its own. --- diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index bbb3334ba..e907a1daa 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -1696,9 +1696,9 @@ int main(int argc, char *argv[]) { } if (status.si_code == CLD_EXITED) { + r = status.si_status; if (status.si_status != 0) { log_error("Container failed with error code %i.", status.si_status); - r = status.si_status; break; }