git://git.onelab.eu
/
lxc-userspace.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8262537
)
Tweaked return code handling to use the usual Python method
author
Sapan Bhatia
<gwsapan@gmail.com>
Tue, 5 Mar 2013 14:19:12 +0000
(09:19 -0500)
committer
Sapan Bhatia
<gwsapan@gmail.com>
Tue, 5 Mar 2013 14:19:12 +0000
(09:19 -0500)
lxcsu
patch
|
blob
|
history
diff --git
a/lxcsu
b/lxcsu
index
baf0e97
..
7a4ed1b
100644
(file)
--- a/
lxcsu
+++ b/
lxcsu
@@
-124,7
+124,5
@@
if (pid == 0):
os.environ['SHELL'] = '/bin/sh'
os.execv('/usr/sbin/capsh',exec_args)
else:
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))