diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/join.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/firejail/join.c b/src/firejail/join.c index f11d85cfe..ea44019ca 100644 --- a/src/firejail/join.c +++ b/src/firejail/join.c | |||
@@ -30,6 +30,12 @@ static uint64_t caps = 0; | |||
30 | static int apply_seccomp = 0; | 30 | static int apply_seccomp = 0; |
31 | #define BUFLEN 4096 | 31 | #define BUFLEN 4096 |
32 | 32 | ||
33 | static void signal_handler(int sig){ | ||
34 | flush_stdin(); | ||
35 | |||
36 | exit(sig); | ||
37 | } | ||
38 | |||
33 | static void extract_command(int argc, char **argv, int index) { | 39 | static void extract_command(int argc, char **argv, int index) { |
34 | EUID_ASSERT(); | 40 | EUID_ASSERT(); |
35 | if (index >= argc) | 41 | if (index >= argc) |
@@ -187,6 +193,7 @@ void join(pid_t pid, int argc, char **argv, int index) { | |||
187 | char *homedir = cfg.homedir; | 193 | char *homedir = cfg.homedir; |
188 | 194 | ||
189 | extract_command(argc, argv, index); | 195 | extract_command(argc, argv, index); |
196 | signal (SIGTERM, signal_handler); | ||
190 | 197 | ||
191 | // if the pid is that of a firejail process, use the pid of the first child process | 198 | // if the pid is that of a firejail process, use the pid of the first child process |
192 | EUID_ROOT(); | 199 | EUID_ROOT(); |