summaryrefslogtreecommitdiffstats
path: root/chrome/browser/zygote_host_linux.h
diff options
context:
space:
mode:
authorkkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-05 02:41:38 +0000
committerkkania@chromium.org <kkania@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-05 02:41:38 +0000
commitcd69619bc053d527b7c82aac81c605157b28d01f (patch)
treef5a50afb86bd0ee0e0dae9a23213dcfaf1b9105e /chrome/browser/zygote_host_linux.h
parent980dbfd913c463f5fa8f1b5943327fe5e4799b20 (diff)
downloadchromium_src-cd69619bc053d527b7c82aac81c605157b28d01f.zip
chromium_src-cd69619bc053d527b7c82aac81c605157b28d01f.tar.gz
chromium_src-cd69619bc053d527b7c82aac81c605157b28d01f.tar.bz2
Revert 46384 - Fix race in zygote_host_linux where socket was being read from and written to on different threads.
Made ZygoteHost methods all run on PROCESS_LAUNCHER thread. PostTask in linux from UI thread to PROCESS_LAUNCHER thread for DidProcessCrash. Changed DidProcessCrash to answer via a callback, which occurs asynchronously on linux. Rework cases in nacl_host, browser_render_process_host, and child_process_host where this method was being called to fit the callback model. BUG=31737 TEST=none Review URL: http://codereview.chromium.org/1695026 TBR=kkania@chromium.org Review URL: http://codereview.chromium.org/1933007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46429 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/zygote_host_linux.h')
-rw-r--r--chrome/browser/zygote_host_linux.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/chrome/browser/zygote_host_linux.h b/chrome/browser/zygote_host_linux.h
index 21118d5..53485e0 100644
--- a/chrome/browser/zygote_host_linux.h
+++ b/chrome/browser/zygote_host_linux.h
@@ -26,19 +26,15 @@ class ZygoteHost {
public:
void Init(const std::string& sandbox_cmd);
- // Tries to start a renderer process. Returns its pid on success, otherwise
- // base::kNullProcessHandle. Must be called on the PROCESS_LAUNCHER
- // thread.
+ // Tries to start a renderer process. Returns its pid on success, otherwise
+ // base::kNullProcessHandle;
pid_t ForkRenderer(const std::vector<std::string>& command_line,
const base::GlobalDescriptors::Mapping& mapping);
-
- // Must be called on the PROCESS_LAUNCHER thread.
void EnsureProcessTerminated(pid_t process);
// Get the termination status (exit code) of the process and return true if
// the status indicates the process crashed. |child_exited| is set to true
// iff the child process has terminated. (|child_exited| may be NULL.)
- // Must be called on the PROCESS_LAUNCHER thread.
bool DidProcessCrash(base::ProcessHandle handle, bool* child_exited);
// These are the command codes used on the wire between the browser and the
@@ -56,10 +52,7 @@ class ZygoteHost {
ZygoteHost();
~ZygoteHost();
- // The socket to the zygote, which should only be accessed on the
- // PROCESS_LAUNCHER thread.
- int control_fd_;
-
+ int control_fd_; // the socket to the zygote
pid_t pid_;
bool init_;
bool using_suid_sandbox_;