summaryrefslogtreecommitdiff
path: root/sal/osl/unx/signal.c
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2010-03-01 14:43:46 +0100
committersb <sb@openoffice.org>2010-03-01 14:43:46 +0100
commit80b39c82606e372f298cdf3c715277b14d3014bd (patch)
tree2a6a64e63b972ee40de289be419373ed24a91e23 /sal/osl/unx/signal.c
parentd2a42ecf88e1485003dce580929d20e2799cc6ee (diff)
parente3e1a6da8047cb36de9a8faf592a69c9a482a5d9 (diff)
merged in CWS sb119
Diffstat (limited to 'sal/osl/unx/signal.c')
-rw-r--r--sal/osl/unx/signal.c11
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;
}