summaryrefslogtreecommitdiff
path: root/vcl/inc/headless
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2016-04-20 13:13:16 +0300
committerTor Lillqvist <tml@collabora.com>2016-04-22 18:09:02 +0300
commitdbced8e8584b631524dacf607f752ebb734901db (patch)
tree7d2a2c493a973bdb39bf23107a73d45b26604e14 /vcl/inc/headless
parentdb18de5868454ed5c242d54e483ea8f403a80601 (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. Change-Id: I03fad4ce4adf14c16cb0f537b3baab58fba38922 Reviewed-on: https://gerrit.libreoffice.org/24256 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'vcl/inc/headless')
-rw-r--r--vcl/inc/headless/svpinst.hxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/inc/headless/svpinst.hxx b/vcl/inc/headless/svpinst.hxx
index 1505a3b16399..76250b1dbaf7 100644
--- a/vcl/inc/headless/svpinst.hxx
+++ b/vcl/inc/headless/svpinst.hxx
@@ -92,6 +92,9 @@ public:
SvpSalInstance( SalYieldMutex *pMutex );
virtual ~SvpSalInstance();
+ void CloseWakeupPipe();
+ void CreateWakeupPipe();
+
void PostEvent(const SalFrame* pFrame, ImplSVEvent* pData, sal_uInt16 nEvent);
#ifdef ANDROID