summaryrefslogtreecommitdiff
path: root/desktop/unx/source/args.c
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/unx/source/args.c')
-rw-r--r--desktop/unx/source/args.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/desktop/unx/source/args.c b/desktop/unx/source/args.c
index 199b58a8e50e..81a8dbca4bb5 100644
--- a/desktop/unx/source/args.c
+++ b/desktop/unx/source/args.c
@@ -9,6 +9,10 @@
#include <stdlib.h>
#include <string.h>
#include <osl/process.h>
+#ifdef LINUX
+#include <sys/prctl.h>
+#include <signal.h>
+#endif
#include "args.h"
@@ -121,6 +125,15 @@ Args *args_parse (void)
args->pPageinType = pArgDescr[j].pPageinType;
break;
}
+ if (rtl_ustr_ascii_compare_WithLength(
+ arg, length, "dont-survive-parent")
+ == 0)
+ {
+#ifdef LINUX
+ prctl(PR_SET_PDEATHSIG, SIGKILL);
+#endif
+ break;
+ }
}
}