loolwsd: correct pre-spawn childs

Change-Id: Id306176296dde6f63821041eae1b28d23637f18d
Reviewed-on: https://gerrit.libreoffice.org/21934
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
This commit is contained in:
Ashod Nakashian 2016-01-29 07:57:32 -05:00 committed by Ashod Nakashian
parent a956c61b07
commit 450bf8eebe

View file

@ -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.");