Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4776)

Unified Diff: chrome/browser/zygote_host_linux.h

Issue 3386014: This adds some plumbing for propagating the status and error code of a (Closed)
Patch Set: Fixed Mac code to handle both SEGV and BUS Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/web_resource/web_resource_service.cc ('k') | chrome/browser/zygote_host_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/zygote_host_linux.h
diff --git a/chrome/browser/zygote_host_linux.h b/chrome/browser/zygote_host_linux.h
index dd00336655b61fab17988008670ea6fc5535a267..68a72edca89c01de082f1f3f1342b5bd0e301efb 100644
--- a/chrome/browser/zygote_host_linux.h
+++ b/chrome/browser/zygote_host_linux.h
@@ -14,6 +14,7 @@
#include "base/global_descriptors_posix.h"
#include "base/lock.h"
#include "base/process.h"
+#include "base/process_util.h"
template<typename Type>
struct DefaultSingletonTraits;
@@ -34,17 +35,18 @@ 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);
+ // Get the termination status (and, optionally, the exit code) of
+ // the process. |exit_code| is set to the exit code of the child
+ // process. (|exit_code| may be NULL.)
+ base::TerminationStatus GetTerminationStatus(base::ProcessHandle handle,
+ int* exit_code);
// 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.
- kCmdDidProcessCrash = 2, // Check if child process crashed.
+ kCmdGetTerminationStatus = 2, // Check what happend to a child process.
kCmdGetSandboxStatus = 3, // Read a bitmask of kSandbox*
};
« no previous file with comments | « chrome/browser/web_resource/web_resource_service.cc ('k') | chrome/browser/zygote_host_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698