attempt to return correct retcod to vsh
[lxc-userspace.git] / lxcsu
diff --git a/lxcsu b/lxcsu
index bf69e50..baf0e97 100644 (file)
--- a/lxcsu
+++ b/lxcsu
@@ -124,4 +124,7 @@ if (pid == 0):
     os.environ['SHELL'] = '/bin/sh'
     os.execv('/usr/sbin/capsh',exec_args)
 else:
-    os.waitpid(pid,0)
+    (r_pid,combined)=os.waitpid(pid,0)
+    retcod=combined/256
+    sys.exit(retcod)
+