summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/runqueue.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 3c72b60f50..e8dfb394cd 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -937,8 +937,9 @@ class RunQueue:
937 if self.worker: 937 if self.worker:
938 self.teardown_workers() 938 self.teardown_workers()
939 self.teardown = False 939 self.teardown = False
940 self.oldsigchld = signal.getsignal(signal.SIGCHLD) 940 if not self.oldsigchld:
941 signal.signal(signal.SIGCHLD, self.sigchild_exception) 941 self.oldsigchld = signal.getsignal(signal.SIGCHLD)
942 signal.signal(signal.SIGCHLD, self.sigchild_exception)
942 self.worker, self.workerpipe = self._start_worker() 943 self.worker, self.workerpipe = self._start_worker()
943 944
944 def start_fakeworker(self, rqexec): 945 def start_fakeworker(self, rqexec):
@@ -949,6 +950,7 @@ class RunQueue:
949 self.teardown = True 950 self.teardown = True
950 if self.oldsigchld: 951 if self.oldsigchld:
951 signal.signal(signal.SIGCHLD, self.oldsigchld) 952 signal.signal(signal.SIGCHLD, self.oldsigchld)
953 self.oldsigchld = None
952 self._teardown_worker(self.worker, self.workerpipe) 954 self._teardown_worker(self.worker, self.workerpipe)
953 self.worker = None 955 self.worker = None
954 self.workerpipe = None 956 self.workerpipe = None