summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2017-12-25 15:02:41 -0500
committerAndras Timar <andras.timar@collabora.com>2018-03-20 12:26:28 +0100
commite97590d3abd430d353cc692124bc41d0111e6cd4 (patch)
treebf86008bea23966759d1a25eb18c52b0dd227351 /desktop
parent6fb9ccd212130c890f93e27cf3a3b0743b42f45d (diff)
rtl: support start/stop threads around pre-init
This is necessary to avoid having extra threads while forking. After forking, the second stage of pre-init is started and so we start the stopped rtl threads. The comment for rtl_alloc_preInit_phase_t has more details. Reviewed-on: https://gerrit.libreoffice.org/47060 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit 271a663d2f098f3f665cab6da2e13b265a7eab93) Change-Id: I1a3f7be74d4b04d0b2fc4a72b02124c2faa3c047
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index f87caa5b0787..f8aebcfc8606 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3552,7 +3552,9 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char
return 1;
if (eStage == PRE_INIT)
- rtl_alloc_preInit(true);
+ rtl_alloc_preInit(rtlAllocPreInitStart);
+ else if (eStage == SECOND_INIT)
+ rtl_alloc_preInit(rtlAllocPreInitEnd);
if (eStage != SECOND_INIT)
comphelper::LibreOfficeKit::setActive();
@@ -3707,7 +3709,7 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char
}
if (eStage == PRE_INIT)
- rtl_alloc_preInit(false);
+ rtl_alloc_preInit(rtlAllocPostInit);
return bInitialized;
}