summaryrefslogtreecommitdiff
path: root/unpack/rdsquashfs.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-07-25 22:24:00 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-07-25 22:30:19 +0200
commit75dea27979f0d219eed9c6afc3a721f592f7ca2a (patch)
treea7724d2cf73aae17bddeddd3c3d0906320f35e18 /unpack/rdsquashfs.h
parent7c5cd1e104f23ec7d9c23086993630f398e2d8e0 (diff)
Terminate the unpacker child processes if the main process exits
Should the main process exit (e.g. the user presses CTRL+C) or explcitily sends it a signal, the desired behaviour is for the children to stop unpacking and exit. This commit adds a line to configure the kernel to send SIGKILL to the children if their parent dies. The same option also exists on various BSDs (not all of them) but with a different name which has to be checked for and adjusted should the program be required to run on one of those. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'unpack/rdsquashfs.h')
-rw-r--r--unpack/rdsquashfs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/unpack/rdsquashfs.h b/unpack/rdsquashfs.h
index 34404b0..8866679 100644
--- a/unpack/rdsquashfs.h
+++ b/unpack/rdsquashfs.h
@@ -15,6 +15,7 @@
#include <sys/sysmacros.h>
#include <sys/types.h>
+#include <sys/prctl.h>
#include <sys/wait.h>
#include <string.h>
#include <stdlib.h>