Kaydet (Commit) 796d2739 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Clarify SIGHUP behavior

The combination of marking it as ACT_IGNORE and osl_Signal_Terminate was
strange, as osl_Signal_Terminate caused SalMainPipeExchangeSignal_impl
(desktop/source/app/officeipcthread.cxx) to call DisableOfficeIPCThread, but
ACT_IGNORE (instead of ACT_EXIT, like other signals marked osl_Signal_Terminate)
caused the process to continue running.  The net effect was that calling an
additional soffice instance after a SIGHUP would no longer connect to the first
instance, but instead would lead to two soffice instances running simultaneously
on the same UserInstallation.

Marking SIGHUP as ACT_HIDE most closely resembles the old behavior (of having
~no effect).  Other options would be to mark it as ACT_IGNORE and
osl_Signal_System or as ACT_EXIT and osl_Signal_Terminate, which would both
result in instant termination.  I do not know if that wouldn't actually be
better.

Change-Id: Id1ee7c1108765301e6010e0e05d6c1ff5894a414
üst bf729a27
......@@ -105,7 +105,7 @@ static struct SignalAction
void (*Handler)(int);
} Signals[] =
{
{ SIGHUP, ACT_IGNORE, NULL }, /* hangup */
{ SIGHUP, ACT_HIDE, NULL }, /* hangup */
{ SIGINT, ACT_EXIT, NULL }, /* interrupt (rubout) */
{ SIGQUIT, ACT_EXIT, NULL }, /* quit (ASCII FS) */
{ SIGILL, ACT_SYSTEM, NULL }, /* illegal instruction (not reset when caught) */
......@@ -973,7 +973,6 @@ void SignalHandlerFunction(int Signal)
case SIGINT:
case SIGTERM:
case SIGQUIT:
case SIGHUP:
Info.Signal = osl_Signal_Terminate;
break;
......
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