summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 087f72fc56..a08c14bbdc 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -153,9 +153,14 @@ class BBCooker:
153 self.parser = None 153 self.parser = None
154 154
155 signal.signal(signal.SIGTERM, self.sigterm_exception) 155 signal.signal(signal.SIGTERM, self.sigterm_exception)
156 # Let SIGHUP exit as SIGTERM
157 signal.signal(signal.SIGHUP, self.sigterm_exception)
156 158
157 def sigterm_exception(self, signum, stackframe): 159 def sigterm_exception(self, signum, stackframe):
158 bb.warn("Cooker recieved SIGTERM, shutting down...") 160 if signum == signal.SIGTERM:
161 bb.warn("Cooker recieved SIGTERM, shutting down...")
162 elif signum == signal.SIGHUP:
163 bb.warn("Cooker recieved SIGHUP, shutting down...")
159 self.state = state.forceshutdown 164 self.state = state.forceshutdown
160 165
161 def setFeatures(self, features): 166 def setFeatures(self, features):