Kaydet (Commit) 739cbf2e authored tarafından Stephan Bergmann's avatar Stephan Bergmann

RequestHandler::Disable(join = false) is problematic

...as it causes ~RequestHandler to be called with mIpcThread still running,
triggering the assert in ~RequestHandler and keeping the thread potentially
still running during exit.

The odd SalMainPipeExchangeSignal_impl acting upong just SIGTERM (instead of
turning off the IPC thread early for each invocation of LO's signal handler,
say) is effectively like that ever since
ee3351d7 "#89023# splash screen optimization";
just change it to use RequestHandler::SetDowning instead.

Change-Id: I238476706c2463130a6ede64a062d46af953ba6f
üst 3cdc8c27
...@@ -300,7 +300,7 @@ void ImplPostProcessDocumentsEvent( ProcessDocumentsRequest* pEvent ) ...@@ -300,7 +300,7 @@ void ImplPostProcessDocumentsEvent( ProcessDocumentsRequest* pEvent )
oslSignalAction SAL_CALL SalMainPipeExchangeSignal_impl(void* /*pData*/, oslSignalInfo* pInfo) oslSignalAction SAL_CALL SalMainPipeExchangeSignal_impl(void* /*pData*/, oslSignalInfo* pInfo)
{ {
if( pInfo->Signal == osl_Signal_Terminate ) if( pInfo->Signal == osl_Signal_Terminate )
RequestHandler::Disable(false); RequestHandler::SetDowning();
return osl_Signal_ActCallNextHdl; return osl_Signal_ActCallNextHdl;
} }
...@@ -879,7 +879,7 @@ RequestHandler::Status PipeIpcThread::enable(rtl::Reference<IpcThread> * thread) ...@@ -879,7 +879,7 @@ RequestHandler::Status PipeIpcThread::enable(rtl::Reference<IpcThread> * thread)
} }
} }
void RequestHandler::Disable(bool join) void RequestHandler::Disable()
{ {
osl::ClearableMutexGuard aMutex( GetMutex() ); osl::ClearableMutexGuard aMutex( GetMutex() );
...@@ -899,7 +899,7 @@ void RequestHandler::Disable(bool join) ...@@ -899,7 +899,7 @@ void RequestHandler::Disable(bool join)
handler->cReady.set(); handler->cReady.set();
// exit gracefully and join // exit gracefully and join
if (join && handler->mIpcThread.is()) if (handler->mIpcThread.is())
{ {
handler->mIpcThread->join(); handler->mIpcThread->join();
handler->mIpcThread.clear(); handler->mIpcThread.clear();
......
...@@ -120,7 +120,7 @@ class RequestHandler: public salhelper::SimpleReferenceObject ...@@ -120,7 +120,7 @@ class RequestHandler: public salhelper::SimpleReferenceObject
// return sal_False if second office // return sal_False if second office
static Status Enable(bool ipc); static Status Enable(bool ipc);
static void Disable(bool join = true); static void Disable();
// start dispatching events... // start dispatching events...
static void SetReady(); static void SetReady();
static void WaitForReady(); static void WaitForReady();
......
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