[Toaster] [PATCH 4/4] toaster: run builds in pid namespace
Ed Bartosh
ed.bartosh at linux.intel.com
Tue Aug 23 04:44:44 PDT 2016
Used pid namespace for runbuilds process. As runbuilds becomes
an init(pid 1) in its pid namespace, killing it will result in
killing all processes in the pid namespace(children of runbuilds process).
This way is much more effective than using PIDs or even PGIDs as
it doesn't leave any processes running.
Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
---
bitbake/bin/toaster | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster
index e6a5696..3cae49b 100755
--- a/bitbake/bin/toaster
+++ b/bitbake/bin/toaster
@@ -250,7 +250,7 @@ case $CMD in
return 4
fi
export BITBAKE_UI='toasterui'
- $MANAGE runbuilds &
+ unshare --user --pid --fork $MANAGE runbuilds &
ps -o pgid= $! | grep -o '[0-9]\+' > ${BUILDDIR}/.runbuilds.pgid
# set fail safe stop system on terminal exit
trap stop_system SIGHUP
--
2.6.6
More information about the toaster
mailing list