From: Sapan Bhatia Date: Tue, 21 Jan 2014 14:45:46 +0000 (-0500) Subject: Fixed tabulation issue in the previous patch X-Git-Tag: lxc-userspace-1.0-9~6 X-Git-Url: http://git.onelab.eu/?p=lxc-userspace.git;a=commitdiff_plain;h=b99ff9b37b2c77f668a7c00e56ded34c7f69a0fc Fixed tabulation issue in the previous patch --- diff --git a/lxcsu b/lxcsu index ebc3cf5..d5f26cc 100755 --- a/lxcsu +++ b/lxcsu @@ -105,7 +105,8 @@ def main (): # convert to int as a minimal raincheck driver_pid = int(os.popen(cmd).read().strip()) # locate the pid for the - expected - single child, that would be the init for that VM - init_pid = int(open("/proc/%s/task/%s/children"%(driver_pid,driver_pid)).read().strip()) + #init_pid = int(open("/proc/%s/task/%s/children"%(driver_pid,driver_pid)).read().strip()) + init_pid = int(os.popen('pgrep -P %s'%driver_pid).readlines()[0].strip()) # Thierry: I am changing the code below to use child_pid instead of driver_pid # for the namespace handling features, that I was able to check # I've left the other ones as they were, i.e. using driver_pid, but I suspect