diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2017-12-25 15:02:41 -0500 |
---|---|---|
committer | Ashod Nakashian <ashnakash@gmail.com> | 2017-12-28 19:10:01 +0100 |
commit | 271a663d2f098f3f665cab6da2e13b265a7eab93 (patch) | |
tree | 568e9d601da6fbf6612200aa9f951c1fd64495dc /desktop | |
parent | 0217031a98508731f15df9d361a6e5b584db5716 (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.
Change-Id: I1a3f7be74d4b04d0b2fc4a72b02124c2faa3c047
Reviewed-on: https://gerrit.libreoffice.org/47060
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 6 |
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; } |