diff options
-rw-r--r-- | src/firejail/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/firejail/main.c b/src/firejail/main.c index b267a5ecb..b029ef21e 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -125,6 +125,7 @@ static void myexit(int rv) { | |||
125 | } | 125 | } |
126 | 126 | ||
127 | static void my_handler(int s){ | 127 | static void my_handler(int s){ |
128 | EUID_ROOT(); | ||
128 | if (!arg_quiet) | 129 | if (!arg_quiet) |
129 | printf("\nSignal %d caught, shutting down the child process\n", s); | 130 | printf("\nSignal %d caught, shutting down the child process\n", s); |
130 | logsignal(s); | 131 | logsignal(s); |
@@ -2082,8 +2083,10 @@ int main(int argc, char **argv) { | |||
2082 | // handle CTRL-C in parent | 2083 | // handle CTRL-C in parent |
2083 | signal (SIGINT, my_handler); | 2084 | signal (SIGINT, my_handler); |
2084 | signal (SIGTERM, my_handler); | 2085 | signal (SIGTERM, my_handler); |
2086 | |||
2085 | 2087 | ||
2086 | // wait for the child to finish | 2088 | // wait for the child to finish |
2089 | EUID_USER(); | ||
2087 | int status = 0; | 2090 | int status = 0; |
2088 | waitpid(child, &status, 0); | 2091 | waitpid(child, &status, 0); |
2089 | 2092 | ||