[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - wsd/LOOLWSD.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Fri Jul 28 16:00:04 UTC 2017
wsd/LOOLWSD.cpp | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
New commits:
commit 022ecf39a976605aa0384b0568d53d023f22a905
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Mon Jun 19 22:47:30 2017 -0400
wsd: always prespawn children when creating forkit
Also, no need for the DocBrokerMutex to be locked
in createForkit.
Change-Id: I651c50c8b5518f7b0ee0d8b15c413fc070e30443
Reviewed-on: https://gerrit.libreoffice.org/38993
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
(cherry picked from commit bc067c7b299ed1299b7fb4546444abf403cb6c5b)
Reviewed-on: https://gerrit.libreoffice.org/38996
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 098c576d..2d91d49b 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -1141,6 +1141,8 @@ bool LOOLWSD::createForKit()
#else
LOG_INF("Creating new forkit process.");
+ std::unique_lock<std::mutex> newChildrenLock(NewChildrenMutex);
+
Process::Args args;
args.push_back("--losubpath=" + std::string(LO_JAIL_SUBPATH));
args.push_back("--systemplate=" + SysTemplate);
@@ -1165,10 +1167,6 @@ bool LOOLWSD::createForKit()
args.push_back("--nocaps");
}
- // If we're recovering forkit, don't allow processing new requests.
- std::unique_lock<std::mutex> docBrokersLock(DocBrokersMutex);
- std::unique_lock<std::mutex> newChildrenLock(NewChildrenMutex);
-
// Always reap first, in case we haven't done so yet.
int status;
waitpid(ForKitProcId, &status, WUNTRACED | WNOHANG);
@@ -1199,6 +1197,7 @@ bool LOOLWSD::createForKit()
// Init the Admin manager
Admin::instance().setForKitPid(ForKitProcId);
+ rebalanceChildren(LOOLWSD::NumPreSpawnedChildren - 1);
return ForKitProcId != -1;
#endif
}
@@ -2498,9 +2497,6 @@ int LOOLWSD::innerMain()
}
#endif
- // Prefork initial children
- prespawnChildren();
-
// Start the server.
srv.start(ClientPortNumber);
More information about the Libreoffice-commits
mailing list