cgroup: call cgroups by the binary name and pid instead of just pid
This makes it slightly easier to identify what's going on by looking
at the control group hierarchy.
BUG=none
TEST=run trybot with pretty much anything
Change-Id: Ie986fa65e9bf95d95403771cdaef98c90a01725a
Reviewed-on: https://gerrit.chromium.org/gerrit/16055
Reviewed-by: Zdenek Behan <zbehan@chromium.org>
Tested-by: Brian Harring <ferringb@chromium.org>
Commit-Ready: Brian Harring <ferringb@chromium.org>
diff --git a/scripts/cros_sdk.py b/scripts/cros_sdk.py
index 8642d73..7c91ecd 100644
--- a/scripts/cros_sdk.py
+++ b/scripts/cros_sdk.py
@@ -326,7 +326,7 @@
lock_path = os.path.join(lock_path,
'.%s_lock' % os.path.basename(chroot_path))
with sudo.SudoKeepAlive():
- with cgroups.ContainChildren('cros_sdk'):
+ with cgroups.SimpleContainChildren('cros_sdk'):
_CreateLockFile(lock_path)
with locking.FileLock(lock_path, 'chroot lock') as lock:
if options.delete: