diff --git a/loolwsd/LOOLBroker.cpp b/loolwsd/LOOLBroker.cpp index 8096e7bf4..3f32483f1 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(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.");