summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/cooker.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 8d63195189..9cb74d1818 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -37,6 +37,7 @@ from collections import defaultdict
37import bb, bb.exceptions, bb.command 37import bb, bb.exceptions, bb.command
38from bb import utils, data, parse, event, cache, providers, taskdata, runqueue 38from bb import utils, data, parse, event, cache, providers, taskdata, runqueue
39import Queue 39import Queue
40import signal
40import prserv.serv 41import prserv.serv
41 42
42logger = logging.getLogger("BitBake") 43logger = logging.getLogger("BitBake")
@@ -149,6 +150,12 @@ class BBCooker:
149 150
150 self.parser = None 151 self.parser = None
151 152
153 signal.signal(signal.SIGTERM, self.sigterm_exception)
154
155 def sigterm_exception(self, signum, stackframe):
156 bb.warn("Cooker recieved SIGTERM, shutting down...")
157 self.state = state.forceshutdown
158
152 def setFeatures(self, features): 159 def setFeatures(self, features):
153 original_featureset = list(self.featureset) 160 original_featureset = list(self.featureset)
154 for feature in features: 161 for feature in features: