@@ -2146,7 +2146,7 @@ class CookerParser(object):
def init():
signal.signal(signal.SIGTERM, signal.SIG_DFL)
signal.signal(signal.SIGHUP, signal.SIG_DFL)
- signal.signal(signal.SIGINT, signal.SIG_IGN)
+ signal.signal(signal.SIGINT, signal.default_int_handler)
bb.utils.set_process_name(multiprocessing.current_process().name)
multiprocessing.util.Finalize(None, bb.codeparser.parser_cache_save, exitpriority=1)
multiprocessing.util.Finalize(None, bb.fetch.fetcher_parse_save, exitpriority=1)
@@ -2194,6 +2194,9 @@ class CookerParser(object):
except queue.Empty:
break
+ for process in self.processes:
+ os.kill(process.pid, signal.SIGINT)
+
for process in self.processes:
if force:
process.join(.1)
To try and improve shutdown, sent SIGINT to parsing processes now it is handled safely around locks, perhaps avoiding the need for the more risky SIGTERM. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> --- lib/bb/cooker.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)