summaryrefslogtreecommitdiffstats
path: root/desktop/unx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-06-08 07:37:21 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-06-08 08:50:54 +0200
commit7b379661e6b99d103411a21b256a38fdc5357961 (patch)
tree395114306ca501f66288ab7e5e2027bca935df86 /desktop/unx
parenttdf#131990 MACROS: fixes return value of UpDown Method (diff)
downloadcore-7b379661e6b99d103411a21b256a38fdc5357961.tar.gz
core-7b379661e6b99d103411a21b256a38fdc5357961.zip
Reliably terminate soffice.bin when terminating soffice
d58a3e5f85d44efc9d21dd56329a3ef20cb3692f "Reliably terminate soffice when connect throws an exception" had been a partial thinko: When kill()'ing (i.e., sending SIGKILL on POSIX) soffice (aka oosplash exec'ed from it), the soffice.bin forked from it can still keep on running. So terminate() (i.e., send SIGTERM on POSIX) soffice aka ooslpash, and in its sigterm_handler actually wait for the soffice.bin process. (Where the latter should just be a saftey measure. At least on POSIX, osl_terminateProcess as called from the oosplash sigterm_handler sends a SIGKILL, so should swiftly and reliably kill the soffice.bin process.) Change-Id: Ifd6930691dce34894e76c417e152111983d62b8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95779 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'desktop/unx')
-rw-r--r--desktop/unx/source/start.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index e3e5441bf97e..f95cfe4d1eaa 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -718,8 +718,10 @@ static void sigterm_handler(int ignored)
{
(void) ignored;
- if (g_pProcess)
+ if (g_pProcess) {
osl_terminateProcess(g_pProcess); // forward signal to soffice.bin
+ osl_joinProcess(g_pProcess);
+ }
_exit(255);
}