Kaydet (Commit) a76829b3 authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

merge vosremoval-signal patch

üst 8490c250
...@@ -188,7 +188,7 @@ ResMgr* desktop::Desktop::pResMgr = 0; ...@@ -188,7 +188,7 @@ ResMgr* desktop::Desktop::pResMgr = 0;
namespace desktop namespace desktop
{ {
static SalMainPipeExchangeSignalHandler* pSignalHandler = 0; static oslSignalHandler pSignalHandler = 0;
static sal_Bool _bCrashReporterEnabled = sal_True; static sal_Bool _bCrashReporterEnabled = sal_True;
static const ::rtl::OUString CFG_PACKAGE_COMMON_HELP ( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Office.Common/Help")); static const ::rtl::OUString CFG_PACKAGE_COMMON_HELP ( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Office.Common/Help"));
...@@ -737,7 +737,7 @@ void Desktop::Init() ...@@ -737,7 +737,7 @@ void Desktop::Init()
// disable IPC thread in an instance that is just showing a help message // disable IPC thread in an instance that is just showing a help message
OfficeIPCThread::DisableOfficeIPCThread(); OfficeIPCThread::DisableOfficeIPCThread();
} }
pSignalHandler = new SalMainPipeExchangeSignalHandler; pSignalHandler = osl_addSignalHandler(SalMainPipeExchangeSignal_impl, NULL);
} }
} }
...@@ -772,7 +772,7 @@ void Desktop::DeInit() ...@@ -772,7 +772,7 @@ void Desktop::DeInit()
OfficeIPCThread::DisableOfficeIPCThread(); OfficeIPCThread::DisableOfficeIPCThread();
if( pSignalHandler ) if( pSignalHandler )
DELETEZ( pSignalHandler ); osl_removeSignalHandler( pSignalHandler );
} catch (RuntimeException&) { } catch (RuntimeException&) {
// someone threw an exception during shutdown // someone threw an exception during shutdown
// this will leave some garbage behind.. // this will leave some garbage behind..
...@@ -1467,7 +1467,7 @@ USHORT Desktop::Exception(USHORT nError) ...@@ -1467,7 +1467,7 @@ USHORT Desktop::Exception(USHORT nError)
{ {
OfficeIPCThread::DisableOfficeIPCThread(); OfficeIPCThread::DisableOfficeIPCThread();
if( pSignalHandler ) if( pSignalHandler )
DELETEZ( pSignalHandler ); osl_removeSignalHandler( pSignalHandler );
restartOnMac(false); restartOnMac(false);
_exit( ExitHelper::E_CRASH_WITH_RESTART ); _exit( ExitHelper::E_CRASH_WITH_RESTART );
} }
......
...@@ -296,11 +296,11 @@ void ImplPostProcessDocumentsEvent( ProcessDocumentsRequest* pEvent ) ...@@ -296,11 +296,11 @@ void ImplPostProcessDocumentsEvent( ProcessDocumentsRequest* pEvent )
Application::PostUserEvent( STATIC_LINK( NULL, ProcessEventsClass_Impl, ProcessDocumentsEvent ), pEvent ); Application::PostUserEvent( STATIC_LINK( NULL, ProcessEventsClass_Impl, ProcessDocumentsEvent ), pEvent );
} }
OSignalHandler::TSignalAction SAL_CALL SalMainPipeExchangeSignalHandler::signal(TSignalInfo *pInfo) oslSignalAction SAL_CALL SalMainPipeExchangeSignal_impl(void* /*pData*/, oslSignalInfo* pInfo)
{ {
if( pInfo->Signal == osl_Signal_Terminate ) if( pInfo->Signal == osl_Signal_Terminate )
OfficeIPCThread::DisableOfficeIPCThread(); OfficeIPCThread::DisableOfficeIPCThread();
return (TAction_CallNextHandler); return osl_Signal_ActCallNextHdl;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include <com/sun/star/frame/XTerminateListener.hpp> #include <com/sun/star/frame/XTerminateListener.hpp>
#include <vos/pipe.hxx> #include <vos/pipe.hxx>
#include <osl/security.hxx> #include <osl/security.hxx>
#include <vos/signal.hxx> #include <osl/signal.h>
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
#include <cppuhelper/implbase2.hxx> #include <cppuhelper/implbase2.hxx>
#include <osl/conditn.hxx> #include <osl/conditn.hxx>
...@@ -42,10 +42,7 @@ ...@@ -42,10 +42,7 @@
namespace desktop namespace desktop
{ {
class SalMainPipeExchangeSignalHandler : public vos::OSignalHandler oslSignalAction SAL_CALL SalMainPipeExchangeSignal_impl(void* /*pData*/, oslSignalInfo* pInfo);
{
virtual TSignalAction SAL_CALL signal(TSignalInfo *pInfo);
};
// A request for the current office // A request for the current office
// that was given by command line or by IPC pipe communication. // that was given by command line or by IPC pipe communication.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment