diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-17 15:03:51 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-17 15:03:54 +0000 |
commit | ce17478c8197abf178c00774f5bbe23fd4375ee2 (patch) | |
tree | 6cf91d399a932eb1fdbaf843f228c84265290080 /lib/bb/runqueue.py | |
parent | 37ae4e94d6991d4f05b0236b525e29797ed6e49c (diff) | |
download | openembedded-core-contrib-ce17478c8197abf178c00774f5bbe23fd4375ee2.tar.gz |
runqueue: Don't error if we never setup workers
If we didn't setup any workers (such as bitbake -S), this would error
since we're trying to set a signal handler to None. This patch
avoids that problem.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/runqueue.py')
-rw-r--r-- | lib/bb/runqueue.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py index a30f594e44..3c72b60f50 100644 --- a/lib/bb/runqueue.py +++ b/lib/bb/runqueue.py @@ -947,7 +947,8 @@ class RunQueue: def teardown_workers(self): self.teardown = True - signal.signal(signal.SIGCHLD, self.oldsigchld) + if self.oldsigchld: + signal.signal(signal.SIGCHLD, self.oldsigchld) self._teardown_worker(self.worker, self.workerpipe) self.worker = None self.workerpipe = None |