summaryrefslogtreecommitdiff
path: root/sal/osl
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
parentd2a42ecf88e1485003dce580929d20e2799cc6ee (diff)
parente3e1a6da8047cb36de9a8faf592a69c9a482a5d9 (diff)
merged in CWS sb119
Diffstat (limited to 'sal/osl')
-rw-r--r--sal/osl/unx/signal.c11
-rw-r--r--sal/osl/unx/socket.c4
2 files changed, 15 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;
}
diff --git a/sal/osl/unx/socket.c b/sal/osl/unx/socket.c
index c901aa7b505d..c8faf6c028f5 100644
--- a/sal/osl/unx/socket.c
+++ b/sal/osl/unx/socket.c
@@ -1858,6 +1858,9 @@ void SAL_CALL osl_closeSocket(oslSocket pSocket)
pSocket->m_nLastError=0;
nFD = pSocket->m_Socket;
+ if (nFD == OSL_INVALID_SOCKET)
+ return;
+
pSocket->m_Socket = OSL_INVALID_SOCKET;
#if defined(LINUX)
@@ -1904,6 +1907,7 @@ void SAL_CALL osl_closeSocket(oslSocket pSocket)
#endif /* OSL_DEBUG_LEVEL */
close(nConnFD);
}
+ pSocket->m_bIsAccepting = sal_False;
}
#endif /* LINUX */