summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-05-18 20:52:15 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-05-18 21:11:23 +0200
commitef48b58387fdc04050c3362440ffe3ca0037d8d0 (patch)
tree7ad1c181ed8d0d0742c98e7aeb3628663c3edb75
parent8ba9f9cd1ea4175751b10e270cc39e481daf1972 (diff)
Revert fix for "#i86306# prepare against really broken CUPS installations..."
...from 8046a87ecc879651ee9cf344211cdd198a419cab. At least sometimes in sw_complex test (with various bundled Java extensions enabled) under load, this code reports "Signal 11 during cups initialization called, ignoring cups" and in-process JVM aborts in panic. Looks like a legitimate SIGSEGV (to be translated into java.lang.NullPointerException) from JVM code is erroneously caught by the temporary lcl_signal_action in cupsmgr.cxx instead. As there is no non-cooperative way to have different signal handlers for different threads (at least under POSIX), and <https://issues.apache.org/ooo/show_bug.cgi?id=86306> "office crashes at startup on Solaris Intel" suggests this signal-catching business is only there to work around a completely broken machine, I think it is best to simply remove it again. Change-Id: I55b95a71d622f83c975989a4ffb1d95ef5737075
-rw-r--r--vcl/unx/generic/printer/cupsmgr.cxx48
1 files changed, 1 insertions, 47 deletions
diff --git a/vcl/unx/generic/printer/cupsmgr.cxx b/vcl/unx/generic/printer/cupsmgr.cxx
index a0e020a9ae05..0f45b46c32bf 100644
--- a/vcl/unx/generic/printer/cupsmgr.cxx
+++ b/vcl/unx/generic/printer/cupsmgr.cxx
@@ -43,8 +43,6 @@
#include "rtl/ustrbuf.hxx"
#include <algorithm>
-#include <setjmp.h>
-#include <signal.h>
#define CUPS_LIB_NAME "libcups.so.2"
@@ -442,17 +440,6 @@ void CUPSManager::runDestThread( void* pThis )
((CUPSManager*)pThis)->runDests();
}
-static sigjmp_buf aViolationBuffer;
-
-extern "C"
-{
- static void lcl_signal_action(int nSignal)
- {
- fprintf( stderr, "Signal %d during cups initialization called, ignoring cups\n", nSignal );
- siglongjmp( aViolationBuffer, 1 );
- }
-}
-
void CUPSManager::runDests()
{
#if OSL_DEBUG_LEVEL > 1
@@ -460,25 +447,7 @@ void CUPSManager::runDests()
#endif
cups_dest_t* pDests = NULL;
- // #i86306# prepare against really broken CUPS installations / missing servers
-
- // install signal handler for SEGV, BUS and ABRT
- struct sigaction act;
- struct sigaction oact[3];
-
- act.sa_handler = lcl_signal_action;
- act.sa_flags = 0;
- sigemptyset(&(act.sa_mask));
-
- int nSegvSignalInstalled = sigaction(SIGSEGV, &act, &oact[0]);
- int nBusSignalInstalled = sigaction(SIGBUS, &act, &oact[1]);
- int nAbortSignalInstalled = sigaction(SIGABRT, &act, &oact[2]);
-
- // prepare against a signal during FcInit or FcConfigGetCurrent
- if( sigsetjmp( aViolationBuffer, ~0 ) == 0 )
- {
- // n#722902 - do a fast-failing check for cups working *at
- // all* first
+ // n#722902 - do a fast-failing check for cups working *at all* first
http_t* p_http;
if( (p_http=m_pCUPSWrapper->httpConnectEncrypt(
m_pCUPSWrapper->cupsServer(),
@@ -502,21 +471,6 @@ void CUPSManager::runDests()
#endif
}
}
- else
- {
- #if OSL_DEBUG_LEVEL > 1
- fprintf( stderr, "cupsGetDests crashed, not using CUPS\n" );
- #endif
- }
-
- // restore old signal handlers
- if( nSegvSignalInstalled == 0 )
- sigaction( SIGSEGV, &oact[0], NULL );
- if( nBusSignalInstalled == 0 )
- sigaction( SIGBUS, &oact[1], NULL );
- if( nAbortSignalInstalled == 0 )
- sigaction( SIGABRT, &oact[2], NULL );
-}
void CUPSManager::initialize()
{