]> code.ossystems Code Review - openembedded-core.git/commitdiff
When shutting down, send SIGTERM, not SIGINT
authorChris Larson <clarson@kergoth.com>
Thu, 5 Aug 2010 04:58:51 +0000 (21:58 -0700)
committerRichard Purdie <rpurdie@linux.intel.com>
Fri, 31 Dec 2010 10:34:08 +0000 (10:34 +0000)
SIGINT should be from the user, not a script.  It also doesn't work as
reliably to shut down processes, as it's not always interpreted as a
termination request.  In addition, it causes KeyboardInterrupt exceptions in
the worker processes, which can interfere with our exception handling.

(Bitbake rev: e5f6e0e9de4c6d1dfdd269d2bf7f83c00c415a27)

Signed-off-by: Chris Larson <clarson@kergoth.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
bitbake/lib/bb/runqueue.py

index 4f988dfdc9b0363df969044c4d3133387ebead46..d1e8cd11ee32611697b3bef13d726b8649985914 100644 (file)
@@ -1028,10 +1028,10 @@ class RunQueueExecute:
 
     def finish_now(self):
         if self.stats.active:
-            bb.msg.note(1, bb.msg.domain.RunQueue, "Sending SIGINT to remaining %s tasks" % self.stats.active)
+            bb.msg.note(1, bb.msg.domain.RunQueue, "Sending SIGTERM to remaining %s tasks" % self.stats.active)
             for k, v in self.build_pids.iteritems():
                 try:
-                    os.kill(-k, signal.SIGINT)
+                    os.kill(-k, signal.SIGTERM)
                 except:
                     pass
         for pipe in self.build_pipes: