summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-01-24 08:26:21 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2016-01-24 08:26:21 -0500
commitc26433574672c32d7f8dce232dcff1136865b342 (patch)
treead6aba7956dfd8d7dd8d74a6bc6a79a55bee78ed
parentset terminal window title (diff)
parentMake the sandbox process reap all children. (diff)
downloadfirejail-c26433574672c32d7f8dce232dcff1136865b342.tar.gz
firejail-c26433574672c32d7f8dce232dcff1136865b342.tar.zst
firejail-c26433574672c32d7f8dce232dcff1136865b342.zip
Merge pull request #257 from creideiki/master
Make the sandbox process reap all children.
-rw-r--r--src/firejail/sandbox.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/firejail/sandbox.c b/src/firejail/sandbox.c
index b49172f1f..441269277 100644
--- a/src/firejail/sandbox.c
+++ b/src/firejail/sandbox.c
@@ -134,7 +134,11 @@ static void monitor_application(pid_t app_pid) {
134 usleep(20000); 134 usleep(20000);
135 135
136 int status; 136 int status;
137 unsigned rv = waitpid(app_pid, &status, 0); 137 unsigned rv;
138 do {
139 rv = waitpid(-1, &status, 0);
140 }
141 while(rv != app_pid);
138 if (arg_debug) 142 if (arg_debug)
139 printf("Sandbox monitor: waitpid %u retval %d status %d\n", app_pid, rv, status); 143 printf("Sandbox monitor: waitpid %u retval %d status %d\n", app_pid, rv, status);
140 144