X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lxcsu;h=d5f26cc225063e26c3f4e13f1da93ea1b131799f;hb=b99ff9b37b2c77f668a7c00e56ded34c7f69a0fc;hp=ebc3cf59596c6bc02e806c91b47974ef24a190a8;hpb=2adecab2c9595529b4748c50f78f02a09c8264e8;p=lxc-userspace.git 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