diff options
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 7 |
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 | |||
37 | import bb, bb.exceptions, bb.command | 37 | import bb, bb.exceptions, bb.command |
38 | from bb import utils, data, parse, event, cache, providers, taskdata, runqueue | 38 | from bb import utils, data, parse, event, cache, providers, taskdata, runqueue |
39 | import Queue | 39 | import Queue |
40 | import signal | ||
40 | import prserv.serv | 41 | import prserv.serv |
41 | 42 | ||
42 | logger = logging.getLogger("BitBake") | 43 | logger = 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: |