diff options
Diffstat (limited to 'sal/osl/unx/signal.c')
-rw-r--r-- | sal/osl/unx/signal.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sal/osl/unx/signal.c b/sal/osl/unx/signal.c index df9ad8f27515..c5141fa02260 100644 --- a/sal/osl/unx/signal.c +++ b/sal/osl/unx/signal.c @@ -199,6 +199,7 @@ static sal_Bool InitSignal() int i; struct sigaction act; struct sigaction oact; + sigset_t unset; if (is_soffice_Impl()) { @@ -280,6 +281,16 @@ static sal_Bool InitSignal() } } + /* Clear signal mask inherited from parent process (on Mac OS X, upon a + crash soffice re-execs itself from within the signal handler, so the + second soffice would have the guilty signal blocked and would freeze upon + encountering a similar crash again): */ + if (sigemptyset(&unset) < 0 || + pthread_sigmask(SIG_SETMASK, &unset, NULL) < 0) + { + OSL_TRACE("sigemptyset or pthread_sigmask failed"); + } + return sal_True; } |