summaryrefslogtreecommitdiff
path: root/desktop/source/app/cmdlineargs.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/source/app/cmdlineargs.cxx')
-rw-r--r--desktop/source/app/cmdlineargs.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx
index 381147cd534e..46395ae87133 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -42,6 +42,11 @@
#include <osl/file.hxx>
#include <sal/log.hxx>
+#ifdef LINUX
+#include <sys/prctl.h>
+#include <signal.h>
+#endif
+
using namespace com::sun::star::lang;
using namespace com::sun::star::uri;
using namespace com::sun::star::uno;
@@ -362,6 +367,15 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
{
// Do nothing, accept only for backward compatibility
}
+ else if ( oArg == "dont-survive-parent" )
+ {
+// only supported on linux for now
+#ifdef LINUX
+ prctl(PR_SET_PDEATHSIG, SIGKILL);
+#else
+ fprintf(stderr, "Warning: dont-survive-parent is not supported on this platform (yet).\n");
+#endif
+ }
else if ( oArg == "nologo" )
{
m_nologo = true;