diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-04 04:22:47 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-04 04:22:47 +0000 |
commit | 83a0cbe4af4408d7708bf54750aff66da80f3130 (patch) | |
tree | c75050f0d74936645b8b87f5e9aab9ded61e5bbc /chrome/browser/zygote_host_linux.h | |
parent | da11a4be3902edcdfb5c2f29925e068ebce36a67 (diff) | |
download | chromium_src-83a0cbe4af4408d7708bf54750aff66da80f3130.zip chromium_src-83a0cbe4af4408d7708bf54750aff66da80f3130.tar.gz chromium_src-83a0cbe4af4408d7708bf54750aff66da80f3130.tar.bz2 |
Revert 30938 - Add support for getting the real process id from within the suid sandbox. The browser processes gets the real process ids, so they look correct in the task manager. When it asks the zygote to reap a process, we use the process ids internal to the sandbox.
While we are at it, reap the sandbox process after it clones the zygote and figure out zygote's actual process id. Save the actual process id rather than that of the sandbox.
BUG=20012,20714,23072
TEST=Process IDs for renderers should be correct in the task manager and you should be able to use the end process button to kill them.
Review URL: http://codereview.chromium.org/262020
Review URL: http://codereview.chromium.org/359001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30939 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/zygote_host_linux.h')
-rw-r--r-- | chrome/browser/zygote_host_linux.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/chrome/browser/zygote_host_linux.h b/chrome/browser/zygote_host_linux.h index 5b4244c..516a18b 100644 --- a/chrome/browser/zygote_host_linux.h +++ b/chrome/browser/zygote_host_linux.h @@ -5,26 +5,24 @@ #ifndef CHROME_BROWSER_ZYGOTE_HOST_LINUX_H_ #define CHROME_BROWSER_ZYGOTE_HOST_LINUX_H_ -#include <unistd.h> - #include <string> #include <vector> +#include <unistd.h> + #include "base/global_descriptors_posix.h" #include "base/process.h" template<typename Type> struct DefaultSingletonTraits; -static const char kZygoteMagic[] = "ZYGOTE_OK"; - // http://code.google.com/p/chromium/wiki/LinuxZygote // The zygote host is the interface, in the browser process, to the zygote // process. class ZygoteHost { public: - void Init(const std::string& sandbox_cmd); + ~ZygoteHost(); pid_t ForkRenderer(const std::vector<std::string>& command_line, const base::GlobalDescriptors::Mapping& mapping); @@ -48,11 +46,10 @@ class ZygoteHost { private: friend struct DefaultSingletonTraits<ZygoteHost>; ZygoteHost(); - ~ZygoteHost(); + void LaunchZygoteProcess(); int control_fd_; // the socket to the zygote pid_t pid_; - bool init_; }; #endif // CHROME_BROWSER_ZYGOTE_HOST_LINUX_H_ |