[bitbake-devel] bitbake: cooker: Block SIGINT in worker processes

Submitted by Joshua Watt on Sept. 14, 2020, 9:17 p.m. | Patch ID: 176507

Details

Message ID 20200914211735.10512-1-JPEWhacker@gmail.com
State New
Headers show

Commit Message

Joshua Watt Sept. 14, 2020, 9:17 p.m.
Blocks SIGINT in the worker processes to prevent them from running the
parent process signal handler, which causes them to deadlock under
certain circumstances.

[YOCTO #14034]

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 bitbake/lib/bb/cooker.py | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 58c223c1ca..5442f7d225 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -2093,6 +2093,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)
                 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)