[Libreoffice-commits] online.git: loolwsd/LOOLBroker.cpp

Ashod Nakashian ashod.nakashian at collabora.co.uk
Sat Jan 30 07:43:56 PST 2016


 loolwsd/LOOLBroker.cpp |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 450bf8eebeac76eba5c1ed8a48ce95236a85a1f8
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Fri Jan 29 07:57:32 2016 -0500

    loolwsd: correct pre-spawn childs
    
    Change-Id: Id306176296dde6f63821041eae1b28d23637f18d
    Reviewed-on: https://gerrit.libreoffice.org/21934
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/loolwsd/LOOLBroker.cpp b/loolwsd/LOOLBroker.cpp
index 8096e7b..3f32483 100644
--- a/loolwsd/LOOLBroker.cpp
+++ b/loolwsd/LOOLBroker.cpp
@@ -683,7 +683,6 @@ static int createLibreOfficeKit(const bool sharePages,
     Log::info() << "Adding Kit #" << childCounter << ", PID: " << childPID << Log::end;
 
     _childProcesses[childPID] = std::make_shared<ChildProcess>(childPID, -1, nFIFOWriter);
-    --forkCounter;
     return childPID;
 }
 
@@ -919,6 +918,9 @@ int main(int argc, char** argv)
         exit(-1);
     }
 
+    if (numPreSpawnedChildren > 1)
+        forkCounter = numPreSpawnedChildren - 1;
+
     if ( (readerChild = open(FIFO_BROKER.c_str(), O_RDONLY) ) < 0 )
     {
         Log::error("Error: pipe opened for reading.");


More information about the Libreoffice-commits mailing list