diff options
Diffstat (limited to 'unpack')
| -rw-r--r-- | unpack/fill_files.c | 3 | ||||
| -rw-r--r-- | unpack/rdsquashfs.h | 1 | 
2 files changed, 4 insertions, 0 deletions
diff --git a/unpack/fill_files.c b/unpack/fill_files.c index 865d050..88efd01 100644 --- a/unpack/fill_files.c +++ b/unpack/fill_files.c @@ -97,6 +97,9 @@ int fill_unpacked_files(fstree_t *fs, data_reader_t *data, int flags,  		pid = fork();  		if (pid == 0) { +			/* Kill the child when the parent process dies */ +			prctl(PR_SET_PDEATHSIG, SIGKILL); +  			if (fill_files(data, sublists[i], flags))  				exit(EXIT_FAILURE);  			exit(EXIT_SUCCESS); 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>  | 
