diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/fs_hostname.c | 2 | ||||
-rw-r--r-- | src/firejail/sandbox.c | 14 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/firejail/fs_hostname.c b/src/firejail/fs_hostname.c index 0cf715fe2..15c8f5e36 100644 --- a/src/firejail/fs_hostname.c +++ b/src/firejail/fs_hostname.c | |||
@@ -94,7 +94,7 @@ void fs_resolvconf(void) { | |||
94 | 94 | ||
95 | struct stat s; | 95 | struct stat s; |
96 | 96 | ||
97 | // create a new /etc/hostname | 97 | // create a new /etc/resolv.conf |
98 | if (stat("/etc/resolv.conf", &s) == 0) { | 98 | if (stat("/etc/resolv.conf", &s) == 0) { |
99 | if (arg_debug) | 99 | if (arg_debug) |
100 | printf("Creating a new /etc/resolv.conf file\n"); | 100 | printf("Creating a new /etc/resolv.conf file\n"); |
diff --git a/src/firejail/sandbox.c b/src/firejail/sandbox.c index d797cee61..b413407bd 100644 --- a/src/firejail/sandbox.c +++ b/src/firejail/sandbox.c | |||
@@ -227,11 +227,15 @@ static int monitor_application(pid_t app_pid) { | |||
227 | break; | 227 | break; |
228 | 228 | ||
229 | // handle --timeout | 229 | // handle --timeout |
230 | if (options && --timeout == 0) { | 230 | if (options) { |
231 | kill(-1, SIGTERM); | 231 | if (--timeout == 0) { |
232 | flush_stdin(); | 232 | kill(-1, SIGTERM); |
233 | sleep(1); | 233 | flush_stdin(); |
234 | _exit(1); | 234 | sleep(1); |
235 | _exit(1); | ||
236 | } | ||
237 | else | ||
238 | sleep(1); | ||
235 | } | 239 | } |
236 | } | 240 | } |
237 | while(rv != monitored_pid); | 241 | while(rv != monitored_pid); |