summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-12-04 17:30:47 +0000
committerRichard Purdie <richard@openedhand.com>2006-12-04 17:30:47 +0000
commit21fb2cbe1c9a09c8a1afd63b0fbc940b9147ae38 (patch)
tree2e464633b2fc9c9b3655a86e8f62fc3e71ec1f6d /bitbake/lib/bb
parent62747098a84f085d6f031999bce6028a01c3ddc6 (diff)
downloadopenembedded-core-21fb2cbe1c9a09c8a1afd63b0fbc940b9147ae38.tar.gz
openembedded-core-21fb2cbe1c9a09c8a1afd63b0fbc940b9147ae38.tar.bz2
openembedded-core-21fb2cbe1c9a09c8a1afd63b0fbc940b9147ae38.zip
bitbake runqueue.py: Set children as process group leaders and send SIGTERM to the process groups
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@998 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/runqueue.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 07821e23de..5768e3cf19 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -423,6 +423,8 @@ class RunQueue:
active_builds = 0
# Stop Ctrl+C being sent to children
signal.signal(signal.SIGINT, signal.SIG_IGN)
+ # Make the child the process group leader
+ os.setpgid(0, 0)
sys.stdin = open('/dev/null', 'r')
cooker.configuration.cmd = taskname[3:]
try:
@@ -472,7 +474,7 @@ class RunQueue:
except:
bb.msg.note(1, bb.msg.domain.RunQueue, "Sending SIGTERM to remaining %s tasks" % active_builds)
for k, v in build_pids.iteritems():
- os.kill(k, signal.SIGTERM)
+ os.kill(-k, signal.SIGTERM)
raise
# Sanity Checks