summaryrefslogtreecommitdiffstats
path: root/chrome/browser/zygote_host_linux.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/zygote_host_linux.h')
-rw-r--r--chrome/browser/zygote_host_linux.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/chrome/browser/zygote_host_linux.h b/chrome/browser/zygote_host_linux.h
index 01a6443..e13f1b4 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;
@@ -37,26 +38,27 @@ 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.
- kCmdGetSandboxStatus = 3, // Read a bitmask of kSandbox*
+ kCmdFork = 0, // Fork off a new renderer.
+ kCmdReap = 1, // Reap a renderer child.
+ kCmdGetTerminationStatus = 2, // Check what happend to a child process.
+ kCmdGetSandboxStatus = 3, // Read a bitmask of kSandbox*
};
// These form a bitmask which describes the conditions of the sandbox that
// the zygote finds itself in.
enum {
- kSandboxSUID = 1 << 0, // SUID sandbox active
- kSandboxPIDNS = 1 << 1, // SUID sandbox is using the PID namespace
- kSandboxNetNS = 1 << 2, // SUID sandbox is using the network namespace
+ kSandboxSUID = 1 << 0, // SUID sandbox active
+ kSandboxPIDNS = 1 << 1, // SUID sandbox is using the PID namespace
+ kSandboxNetNS = 1 << 2, // SUID sandbox is using the network namespace
kSandboxSeccomp = 1 << 3, // seccomp sandbox active.
};