attempt to return correct retcod to vsh
Thierry Parmentelat [Mon, 4 Mar 2013 09:11:34 +0000 (10:11 +0100)]
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)
+