[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4-0' - wsd/LOOLWSD.cpp
Ashod Nakashian (via logerrit)
logerrit at kemper.freedesktop.org
Fri Nov 15 10:10:19 UTC 2019
wsd/LOOLWSD.cpp | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
New commits:
commit 9156f4e9e0eb5c81424e8650d6a9eb4168bf93c4
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Tue Nov 12 10:37:00 2019 -0500
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Fri Nov 15 11:10:01 2019 +0100
wsd: Destroy ChildProcess instances before exit
ChildProcess instances log in the dtor, and this can
happen after the log subsystem has been destroyed,
because the order of destruction is undefined.
NewChildren is destroyed in exit, at which point
we have no control over the log subsystem.
To avoid this inversion of order, we clear
the NewChildren container before exiting.
Reviewed-on: https://gerrit.libreoffice.org/82533
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
(cherry picked from commit 4cb038c60a0fdb22274874701c45156fd51bcad4)
Change-Id: I7b1bac3123fd7917616c11ab9674534c9222fff1
Reviewed-on: https://gerrit.libreoffice.org/82707
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index ad387d104..997e7d839 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -216,7 +216,7 @@ std::set<std::string> LOOLWSD::EditFileExtensions;
#ifdef MOBILEAPP
-// Or can this be retreieved in some other way?
+// Or can this be retrieved in some other way?
int LOOLWSD::prisonerServerSocketFD;
#else
@@ -410,7 +410,7 @@ static bool cleanupChildren()
return static_cast<int>(NewChildren.size()) != count;
}
-/// Decides how many children need spawning and spanws.
+/// Decides how many children need spawning and spawns.
/// Returns the number of children requested to spawn,
/// -1 for error.
static int rebalanceChildren(int balance)
@@ -728,7 +728,7 @@ public:
};
/// This thread listens for and accepts prisoner kit processes.
-/// And also cleans up and balances the correct number of childen.
+/// And also cleans up and balances the correct number of children.
PrisonerPoll PrisonerPoll;
/// Helper class to hold default configuration entries.
@@ -2458,7 +2458,7 @@ private:
std::vector<char> saveasRequest(saveas.begin(), saveas.end());
clientSession->handleMessage(true, WSOpCode::Text, saveasRequest);
});
- });
+ });
sent = true;
}
@@ -3154,11 +3154,13 @@ int LOOLWSD::innerMain()
LOG_FTL("Missing --systemplate option");
throw MissingOptionException("systemplate");
}
+
if (LoTemplate.empty())
{
LOG_FTL("Missing --lotemplate option");
throw MissingOptionException("lotemplate");
}
+
if (ChildRoot.empty())
{
LOG_FTL("Missing --childroot option");
@@ -3273,6 +3275,7 @@ int LOOLWSD::innerMain()
}
#endif
}
+
// Stop the listening to new connections
// and wait until sockets close.
LOG_INF("Stopping server socket listening. ShutdownRequestFlag: " <<
@@ -3345,6 +3348,8 @@ int LOOLWSD::innerMain()
child->terminate();
}
+ NewChildren.clear();
+
#ifndef MOBILEAPP
#ifndef KIT_IN_PROCESS
// Wait for forkit process finish.
More information about the Libreoffice-commits
mailing list