summaryrefslogtreecommitdiffstats
path: root/content/common/zygote_commands_linux.h
diff options
context:
space:
mode:
authorjln@chromium.org <jln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-22 16:23:53 +0000
committerjln@chromium.org <jln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-22 16:23:53 +0000
commite72831cac8859a56b03ec76b1c1d4b7fe7409b9d (patch)
tree3c94ac768191e1e02fc110e709346d3b63249373 /content/common/zygote_commands_linux.h
parent55bb20786708942e37293a525cc94a3dd7875086 (diff)
downloadchromium_src-e72831cac8859a56b03ec76b1c1d4b7fe7409b9d.zip
chromium_src-e72831cac8859a56b03ec76b1c1d4b7fe7409b9d.tar.gz
chromium_src-e72831cac8859a56b03ec76b1c1d4b7fe7409b9d.tar.bz2
Zygote: create variables for magic fd numbers
The magic number "7" was used across source files to denote the file descriptor for the dummy fd. BUG=None TEST=None NOTRY=true Review URL: https://chromiumcodereview.appspot.com/10392176 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138269 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/zygote_commands_linux.h')
-rw-r--r--content/common/zygote_commands_linux.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/content/common/zygote_commands_linux.h b/content/common/zygote_commands_linux.h
index fbd767c..0745218 100644
--- a/content/common/zygote_commands_linux.h
+++ b/content/common/zygote_commands_linux.h
@@ -11,6 +11,17 @@ namespace content {
// is ready to go.
static const char kZygoteHelloMessage[] = "ZYGOTE_OK";
+// File descriptors initialized by the Zygote Host
+const int kZygoteSocketPairFd = 3;
+const int kZygoteRendererSocketFd = 5;
+// This file descriptor is special. It is passed to the Zygote and a setuid
+// helper will be called to locate the process of the Zygote on the system.
+// This mechanism is used when multiple PID namespaces exist because of the
+// setuid sandbox.
+// It is very important that this file descriptor does not exist in multiple
+// processes.
+const int kZygoteIdFd = 7;
+
// These are the command codes used on the wire between the browser and the
// zygote.
enum {