summaryrefslogtreecommitdiffstats
path: root/chrome/browser/zygote_host_linux.h
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-17 19:06:26 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-17 19:06:26 +0000
commit89ef3a0ca7e75eabc15509dbd8734625420e673b (patch)
tree8b4807e074c028924fa5d1264042fd341963ce38 /chrome/browser/zygote_host_linux.h
parent519357d2b8ab7ac8d8a6c3fed1dbe744dc6f1bd5 (diff)
downloadchromium_src-89ef3a0ca7e75eabc15509dbd8734625420e673b.zip
chromium_src-89ef3a0ca7e75eabc15509dbd8734625420e673b.tar.gz
chromium_src-89ef3a0ca7e75eabc15509dbd8734625420e673b.tar.bz2
Linux: Enable metrics_service_uitest.cc.
Add support for zygotes to call DidProcessCrash on renderers. TEST=metrics_server_uitest.cc Review URL: http://codereview.chromium.org/126264 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18641 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/zygote_host_linux.h')
-rw-r--r--chrome/browser/zygote_host_linux.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/chrome/browser/zygote_host_linux.h b/chrome/browser/zygote_host_linux.h
index 279918d..94ac92e 100644
--- a/chrome/browser/zygote_host_linux.h
+++ b/chrome/browser/zygote_host_linux.h
@@ -9,7 +9,10 @@
#include <vector>
#include "base/global_descriptors_posix.h"
-#include "base/singleton.h"
+#include "base/process.h"
+
+template<typename Type>
+struct DefaultSingletonTraits;
// http://code.google.com/p/chromium/wiki/LinuxZygote
@@ -23,11 +26,17 @@ class ZygoteHost {
const base::GlobalDescriptors::Mapping& mapping);
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.)
+ bool DidProcessCrash(base::ProcessHandle handle, bool* child_exited);
+
// These are the command codes used on the wire between the browser and the
// zygote.
enum {
- kCmdFork = 0, // Fork off a new renderer.
- kCmdReap = 1, // Reap a renderer child.
+ kCmdFork = 0, // Fork off a new renderer.
+ kCmdReap = 1, // Reap a renderer child.
+ kCmdDidProcessCrash = 2, // Check if child process crashed.
};
private: