diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2024-03-27 17:25:24 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2024-03-28 17:07:15 +0100 |
commit | ccc2e526d107a353469b5aad99e94544c07a10ee (patch) | |
tree | b47c23b10fb045685220510610df601c1c1a10c9 /desktop/source/lib | |
parent | 86837b3d67cfe48a9983a13c5794147e192491a0 (diff) |
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 'desktop/source/lib')
-rw-r--r-- | desktop/source/lib/init.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 99c533c20598..cac261e9bcac 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2543,6 +2543,8 @@ static void lo_stopURP(LibreOfficeKit* pThis, void* pSendURPToLOContext); static int lo_joinThreads(LibreOfficeKit* pThis); +static void lo_setForkedChild(LibreOfficeKit* pThis, bool bIsChild); + static void lo_runLoop(LibreOfficeKit* pThis, LibreOfficeKitPollCallback pPollCallback, LibreOfficeKitWakeCallback pWakeCallback, @@ -2588,6 +2590,7 @@ LibLibreOffice_Impl::LibLibreOffice_Impl() m_pOfficeClass->startURP = lo_startURP; m_pOfficeClass->stopURP = lo_stopURP; m_pOfficeClass->joinThreads = lo_joinThreads; + m_pOfficeClass->setForkedChild = lo_setForkedChild; gOfficeClass = m_pOfficeClass; } @@ -3340,6 +3343,11 @@ static int lo_joinThreads(LibreOfficeKit* /* pThis */) return 1; } +static void lo_setForkedChild(LibreOfficeKit* /* pThis */, bool bIsChild) +{ + comphelper::LibreOfficeKit::setForkedChild(bIsChild); +} + static void lo_registerCallback (LibreOfficeKit* pThis, LibreOfficeKitCallback pCallback, void* pData) |