summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbitbake/bin/bitbake-worker8
1 files changed, 5 insertions, 3 deletions
diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker
index f63f060c57..c1df3ecd9f 100755
--- a/bitbake/bin/bitbake-worker
+++ b/bitbake/bin/bitbake-worker
@@ -195,9 +195,6 @@ def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, taskha
195 global worker_pipe_lock 195 global worker_pipe_lock
196 pipein.close() 196 pipein.close()
197 197
198 signal.signal(signal.SIGTERM, sigterm_handler)
199 # Let SIGHUP exit as SIGTERM
200 signal.signal(signal.SIGHUP, sigterm_handler)
201 bb.utils.signal_on_parent_exit("SIGTERM") 198 bb.utils.signal_on_parent_exit("SIGTERM")
202 199
203 # Save out the PID so that the event can include it the 200 # Save out the PID so that the event can include it the
@@ -212,6 +209,11 @@ def fork_off_task(cfg, data, databuilder, workerdata, fn, task, taskname, taskha
212 # This ensures signals sent to the controlling terminal like Ctrl+C 209 # This ensures signals sent to the controlling terminal like Ctrl+C
213 # don't stop the child processes. 210 # don't stop the child processes.
214 os.setsid() 211 os.setsid()
212
213 signal.signal(signal.SIGTERM, sigterm_handler)
214 # Let SIGHUP exit as SIGTERM
215 signal.signal(signal.SIGHUP, sigterm_handler)
216
215 # No stdin 217 # No stdin
216 newsi = os.open(os.devnull, os.O_RDWR) 218 newsi = os.open(os.devnull, os.O_RDWR)
217 os.dup2(newsi, sys.stdin.fileno()) 219 os.dup2(newsi, sys.stdin.fileno())