wsd/LOOLWSD.cpp |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 859d799f5c70c55584b04ff322b6f68907780d35
Author:     Tor Lillqvist <t...@collabora.com>
AuthorDate: Mon Oct 15 23:56:04 2018 +0300
Commit:     Tor Lillqvist <t...@collabora.com>
CommitDate: Tue Oct 16 01:49:46 2018 +0300

    Do run some cleanups on return from LOOLWSD::innerMain() in the mobile app 
case
    
    Also, re-initialise the lovely TerminationFlag to false in
    LOOLWSD::main().
    
    Change-Id: I8f53e8c809583f931435e6f80324d4438cca4b2a

diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 1b5dd8917..e7d99b5ca 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -3010,9 +3010,6 @@ int LOOLWSD::innerMain()
     }
     LOG_TRC("Loop finished. TerminationFlag=" << TerminationFlag);
 
-// No point in doing any orderly shutdown on mobile, we will never exit 
intentionally, the OS will
-// kill us.
-#ifndef MOBILEAPP
     // Stop the listening to new connections
     // and wait until sockets close.
     LOG_INF("Stopping server socket listening. ShutdownRequestFlag: " <<
@@ -3053,7 +3050,7 @@ int LOOLWSD::innerMain()
 
     DocBrokers.clear();
 
-#ifndef KIT_IN_PROCESS
+#if !defined(KIT_IN_PROCESS) && !defined(MOBILEAPP)
     // Terminate child processes
     LOG_INF("Requesting forkit process " << ForKitProcId << " to terminate.");
     SigUtil::killChild(ForKitProcId);
@@ -3068,6 +3065,7 @@ int LOOLWSD::innerMain()
         child->terminate();
     }
 
+#ifndef MOBILEAPP
 #ifndef KIT_IN_PROCESS
     // Wait for forkit process finish.
     LOG_INF("Waiting for forkit process to exit");
@@ -3111,6 +3109,10 @@ void LOOLWSD::cleanup()
 
 int LOOLWSD::main(const std::vector<std::string>& /*args*/)
 {
+#ifdef MOBILEAPP
+    TerminationFlag = false;
+#endif
+
     int returnValue;
 
     try {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to