[Libreoffice-commits] online.git: wsd/LOOLWSD.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Mon Jan 16 02:14:26 UTC 2017
wsd/LOOLWSD.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit c74c2b8f47c2707a639ef3d57f47e62f01c55e03
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Sun Jan 15 17:46:28 2017 -0500
wsd: increment outstanding forks counter when forking
Change-Id: I6360ea582cc060c51e54fe8bb55eac2f709fbabc
Reviewed-on: https://gerrit.libreoffice.org/33134
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index f040bcd..23507ff 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -176,7 +176,7 @@ static std::vector<std::shared_ptr<ChildProcess> > NewChildren;
static std::mutex NewChildrenMutex;
static std::condition_variable NewChildrenCV;
static std::chrono::steady_clock::time_point LastForkRequestTime = std::chrono::steady_clock::now();
-static std::atomic<int> OutstandingForks(1); // Forkit always spawns 1.
+static std::atomic<int> OutstandingForks(0);
static std::map<std::string, std::shared_ptr<DocumentBroker> > DocBrokers;
static std::mutex DocBrokersMutex;
@@ -2106,6 +2106,10 @@ Process::PID LOOLWSD::createForKit()
std::unique_lock<std::mutex> docBrokersLock(DocBrokersMutex);
std::unique_lock<std::mutex> newChildrenLock(NewChildrenMutex);
+
+ // ForKit always spawns one.
+ ++OutstandingForks;
+
LOG_INF("Launching forkit process: " << forKitPath << ' ' <<
Poco::cat(std::string(" "), args.begin(), args.end()));
More information about the Libreoffice-commits
mailing list