From 2c8fe8fea24b70c3f1039a8ddcb81f8f6b0e555e Mon Sep 17 00:00:00 2001 From: Stas Boukarev Date: Tue, 28 May 2024 01:14:52 +0300 Subject: [PATCH] Clear sigmask on startup. It's inherited from the parent process which may block SIGSEGV. Seems to cause more problems on recent versions of macOS, but linux also can't start with sigsegv blocked. Fixes lp#2067313 --- src/runtime/runtime.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/runtime/runtime.c b/src/runtime/runtime.c index 274687c8f..e7b309b5e 100644 --- a/src/runtime/runtime.c +++ b/src/runtime/runtime.c @@ -646,10 +646,8 @@ initialize_lisp(int argc, char *argv[], char *envp[]) interrupt_init(); #ifdef LISP_FEATURE_UNIX - /* Not sure why anyone sends signals to this process so early. - * But win32 models the signal mask as part of 'struct thread' - * which doesn't exist yet, so don't do this */ - block_blockable_signals(0); + /* Use SETMASK instead of BLOCK to clear the inhereted sigmask. */ + thread_sigmask(SIG_SETMASK, &blockable_sigset, 0); #endif /* Check early to see if this executable has an embedded core, -- 2.11.4.GIT