summaryrefslogtreecommitdiff
path: root/vcl/inc
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2016-04-20 13:13:16 +0300
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2016-06-20 19:45:18 -0400
commite61ed46776d0f52abd892ee2021e1fa770904dce (patch)
treea3418983dae68559f2716655b9f7d36c620f38ba /vcl/inc
parent3dc777d4d630c6a869afd9bae0615f35221ed773 (diff)
Don't share the wakeup pipe with child processes
Create a new pipe in the child process. In a normal desktop LibreOffice each fork() will be followed quickly by an exec(), so the FD_CLOEXEC would be enough for that. In LibreOfficeKit-based software that uses the preinit mechanism, though, the intent is that one can fork child processes without exec(). This solution uses pthread_atfork(). Another way would be to add suitable public API callable from the LibreOfficeKit client initialisation code in desktop/source/lib/init.cxx to explicitly close and reopen the wakeup pipe in the default SvpSalInstance. Reviewed-on: https://gerrit.libreoffice.org/24256 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit 57295468a6770d7831437d83248e68bbe667d86b) Change-Id: I03fad4ce4adf14c16cb0f537b3baab58fba38922
Diffstat (limited to 'vcl/inc')
-rw-r--r--vcl/inc/headless/svpinst.hxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/vcl/inc/headless/svpinst.hxx b/vcl/inc/headless/svpinst.hxx
index 2d2716eb1d4f..a633cc3d3e57 100644
--- a/vcl/inc/headless/svpinst.hxx
+++ b/vcl/inc/headless/svpinst.hxx
@@ -30,6 +30,7 @@
#include <basebmp/scanlineformats.hxx>
#include <list>
+#include <map>
#include <time.h>
@@ -87,13 +88,19 @@ class VCL_DLLPUBLIC SvpSalInstance : public SalGenericInstance
void DoReleaseYield( int nTimeoutMS );
+ typedef std::map< sal_uInt16, ::basebmp::Format > BitCountFormatMap;
+ BitCountFormatMap m_aBitCountFormatMap;
+
public:
static SvpSalInstance* s_pDefaultInstance;
SvpSalInstance( SalYieldMutex *pMutex );
virtual ~SvpSalInstance();
- void PostEvent(const SalFrame* pFrame, ImplSVEvent* pData, sal_uInt16 nEvent);
+ void CloseWakeupPipe();
+ void CreateWakeupPipe();
+
+ void PostEvent(const SalFrame* pFrame, ImplSVEvent* pData, sal_uInt16 nEvent );
#ifdef ANDROID
bool PostedEventsInQueue();