From e6ab81728738af93f406be10dad8ed3e14c6d1fe Mon Sep 17 00:00:00 2001 From: netblue30 Date: Tue, 14 Mar 2017 17:28:38 -0400 Subject: increased delay to 1 second in pid monitoring function for joined processes --- src/firejail/sandbox.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/firejail/sandbox.c b/src/firejail/sandbox.c index faa641d13..f26f8b06a 100644 --- a/src/firejail/sandbox.c +++ b/src/firejail/sandbox.c @@ -208,6 +208,11 @@ static int monitor_application(pid_t app_pid) { while(rv != monitored_pid); if (arg_debug) printf("Sandbox monitor: waitpid %u retval %d status %d\n", monitored_pid, rv, status); + if (rv == -1) { // we can get here if we have processes joining the sandbox (ECHILD) + if (arg_debug) + perror("waitpid"); + sleep(1); + } // if /proc is not remounted, we cannot check /proc directory, // for now we just get out of here -- cgit v1.2.3-70-g09d2