Tweaked return code handling to use the usual Python method
[lxc-userspace.git] / lxcsu
diff --git a/lxcsu b/lxcsu
index bf69e50..7a4ed1b 100644 (file)
--- a/lxcsu
+++ b/lxcsu
@@ -124,4 +124,5 @@ if (pid == 0):
     os.environ['SHELL'] = '/bin/sh'
     os.execv('/usr/sbin/capsh',exec_args)
 else:
-    os.waitpid(pid,0)
+    _,status = os.waitpid(pid,0)
+    exit(os.WEXITSTATUS(status))