diff options
Diffstat (limited to 'Python')
-rw-r--r-- | Python/pylifecycle.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index ec77084..d03c6c0 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -2884,7 +2884,10 @@ PyOS_setsig(int sig, PyOS_sighandler_t handler) struct sigaction context, ocontext; context.sa_handler = handler; sigemptyset(&context.sa_mask); - context.sa_flags = 0; + /* Using SA_ONSTACK is friendlier to other C/C++/Golang-VM code that + * extension module or embedding code may use where tiny thread stacks + * are used. https://bugs.python.org/issue43390 */ + context.sa_flags = SA_ONSTACK; if (sigaction(sig, &context, &ocontext) == -1) return SIG_ERR; return ocontext.sa_handler; |