From a5f5f8a07743bb9aa31fa361c90fce8d4a62388e Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Thu, 2 May 2013 10:39:53 -0400 Subject: [PATCH] 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. --- src/nspawn/nspawn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index bbb3334ba1..e907a1daa7 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; }