[systemd-commits] src/nspawn

Dave Reisner dreisner at kemper.freedesktop.org
Thu May 2 07:42:05 PDT 2013


 src/nspawn/nspawn.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a5f5f8a07743bb9aa31fa361c90fce8d4a62388e
Author: Dave Reisner <dreisner at archlinux.org>
Date:   Thu May 2 10:39:53 2013 -0400

    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 bbb3334..e907a1d 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;
                         }
 



More information about the systemd-commits mailing list