diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-16 02:52:15 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-16 02:52:15 +0000 |
commit | 87ed695ffbaed31b597e39a5a9c367d3e4aba092 (patch) | |
tree | fd7ecf29025771851e862130a142d47209e0b6d7 /chrome/browser/zygote_main_linux.cc | |
parent | 37c12077ecb501fe0b636a22c86a468bb7f61cd3 (diff) | |
download | chromium_src-87ed695ffbaed31b597e39a5a9c367d3e4aba092.zip chromium_src-87ed695ffbaed31b597e39a5a9c367d3e4aba092.tar.gz chromium_src-87ed695ffbaed31b597e39a5a9c367d3e4aba092.tar.bz2 |
Linux: reap the sandbox helper process.
TEST=start chrome with a SUID sandbox and check that no zombies persist.
http://codereview.chromium.org/149734
(Reland of r20838. Hopefully with the reaping in the correct place this time.)
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20845 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/zygote_main_linux.cc')
-rw-r--r-- | chrome/browser/zygote_main_linux.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/zygote_main_linux.cc b/chrome/browser/zygote_main_linux.cc index 08f730e..d03cefe 100644 --- a/chrome/browser/zygote_main_linux.cc +++ b/chrome/browser/zygote_main_linux.cc @@ -8,6 +8,7 @@ #include <sys/socket.h> #include <sys/signal.h> #include <sys/prctl.h> +#include <sys/wait.h> #include "base/command_line.h" #include "base/eintr_wrapper.h" @@ -220,6 +221,9 @@ static bool MaybeEnterChroot() { return false; } + // We need to reap the chroot helper process in any event: + wait(NULL); + char reply; if (HANDLE_EINTR(read(fd, &reply, 1)) != 1) { LOG(ERROR) << "Failed to read from chroot pipe: " << errno; |