diff options
author | Stas Boukarev <stassats@gmail.com> | 2024-05-28 01:14:52 +0300 |
---|---|---|
committer | Stas Boukarev <stassats@gmail.com> | 2024-05-28 01:14:52 +0300 |
commit | 2c8fe8fea24b70c3f1039a8ddcb81f8f6b0e555e (patch) | |
tree | 77312e74deefda03392f2b88837d66ceabeadf21 | |
parent | 1b9a5ed6cf531ba3357197e8516b7696b6291bca (diff) |
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
-rw-r--r-- | src/runtime/runtime.c | 6 |
1 files 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, |