diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2006-12-06 20:13:21 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2006-12-06 20:13:21 +0000 |
commit | 066862d76d3e337d9f2b39d9ff8d4d7a85db225a (patch) | |
tree | d4d0b6911e007a2cfb98d88b4faf111d1207307e | |
parent | 49b429b2f7bcfa7e6250e651998a8a1b8a6b1e64 (diff) | |
download | bitbake-066862d76d3e337d9f2b39d9ff8d4d7a85db225a.tar.gz |
runqeue.py: Send SIGINT, not SIGTERM when ending tasks. Use process groups to ensure all children are terminated.
-rw-r--r-- | lib/bb/runqueue.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py index 07821e23d..4da543ffc 100644 --- a/lib/bb/runqueue.py +++ b/lib/bb/runqueue.py @@ -422,7 +422,9 @@ class RunQueue: # Bypass finally below active_builds = 0 # Stop Ctrl+C being sent to children - signal.signal(signal.SIGINT, signal.SIG_IGN) + # 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: @@ -470,9 +472,9 @@ class RunQueue: if len(failed_fnids) > 0: return failed_fnids except: - bb.msg.note(1, bb.msg.domain.RunQueue, "Sending SIGTERM to remaining %s tasks" % active_builds) + bb.msg.note(1, bb.msg.domain.RunQueue, "Sending SIGINT to remaining %s tasks" % active_builds) for k, v in build_pids.iteritems(): - os.kill(k, signal.SIGTERM) + os.kill(-k, signal.SIGINT) raise # Sanity Checks |