diff options
author | netblue30 <netblue30@yahoo.com> | 2016-01-24 08:26:21 -0500 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-01-24 08:26:21 -0500 |
commit | c26433574672c32d7f8dce232dcff1136865b342 (patch) | |
tree | ad6aba7956dfd8d7dd8d74a6bc6a79a55bee78ed | |
parent | set terminal window title (diff) | |
parent | Make the sandbox process reap all children. (diff) | |
download | firejail-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.c | 6 |
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 | ||