From: Sapan Bhatia Date: Tue, 5 Mar 2013 14:19:12 +0000 (-0500) Subject: Tweaked return code handling to use the usual Python method X-Git-Tag: lxctools-0.9-4~1 X-Git-Url: http://git.onelab.eu/?p=lxc-userspace.git;a=commitdiff_plain;h=fb6b4d4828218fb4681a3b38612e050a0c8f9437 Tweaked return code handling to use the usual Python method --- diff --git a/lxcsu b/lxcsu index baf0e97..7a4ed1b 100644 --- a/lxcsu +++ b/lxcsu @@ -124,7 +124,5 @@ if (pid == 0): os.environ['SHELL'] = '/bin/sh' os.execv('/usr/sbin/capsh',exec_args) else: - (r_pid,combined)=os.waitpid(pid,0) - retcod=combined/256 - sys.exit(retcod) - + _,status = os.waitpid(pid,0) + exit(os.WEXITSTATUS(status))