From faa1ec748bed88bce0e61f3149e82b4661ab761c Mon Sep 17 00:00:00 2001 From: smitsohu Date: Mon, 18 Feb 2019 13:16:34 +0100 Subject: shutdown option: paranoid sleep cf. #2401 increase head start to a full second --- src/firejail/shutdown.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/firejail/shutdown.c b/src/firejail/shutdown.c index 05cfdc89e..24b3665fc 100644 --- a/src/firejail/shutdown.c +++ b/src/firejail/shutdown.c @@ -52,14 +52,13 @@ void shut(pid_t pid) { printf("Sending SIGTERM to %u\n", pid); kill(pid, SIGTERM); - // wait for not more than about 10 seconds - int monsec = 10; + // wait for not more than 11 seconds + int monsec = 11; char *monfile; if (asprintf(&monfile, "/proc/%d/cmdline", pid) == -1) errExit("asprintf"); int killdone = 0; - usleep(200000); // give sandbox a little head start while (monsec) { sleep(1); monsec--; -- cgit v1.2.3-70-g09d2