summaryrefslogtreecommitdiffstats
path: root/comphelper
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2024-03-27 17:25:24 +0000
committerMichael Meeks <michael.meeks@collabora.com>2024-03-28 17:07:15 +0100
commitccc2e526d107a353469b5aad99e94544c07a10ee (patch)
treeb47c23b10fb045685220510610df601c1c1a10c9 /comphelper
parentofz: negative column offset (diff)
downloadcore-ccc2e526d107a353469b5aad99e94544c07a10ee.tar.gz
core-ccc2e526d107a353469b5aad99e94544c07a10ee.zip
lok: add isForkedChild method.
This can be used to tag short-lived transient 'save' processes to encourage them not to mutate eg. filesystem state that is shared with the parent process. Change-Id: I027d18cbe4ce519b31c4fc1d3ac46b916d1efc87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165407 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> (cherry picked from commit 9dab5edb90d14ad6f71cc2ac96cc504c1e8c290b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165427 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/lok.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx
index b5cbcc74cb54..c042b0c626e5 100644
--- a/comphelper/source/misc/lok.cxx
+++ b/comphelper/source/misc/lok.cxx
@@ -19,6 +19,8 @@ namespace comphelper::LibreOfficeKit
static bool g_bActive(false);
+static bool g_bForkedChild(false);
+
static bool g_bPartInInvalidation(false);
static bool g_bTiledPainting(false);
@@ -98,6 +100,16 @@ bool isActive()
return g_bActive;
}
+void setForkedChild(bool bIsChild)
+{
+ g_bForkedChild = bIsChild;
+}
+
+bool isForkedChild()
+{
+ return g_bForkedChild;
+}
+
void setPartInInvalidation(bool bPartInInvalidation)
{
g_bPartInInvalidation = bPartInInvalidation;