1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_COMMON_ZYGOTE_COMMANDS_LINUX_H_
6 #define CONTENT_COMMON_ZYGOTE_COMMANDS_LINUX_H_
10 // Contents of the initial message sent from the zygote to the browser when it
12 static const char kZygoteHelloMessage
[] = "ZYGOTE_OK";
14 // Maximum allowable length for messages sent to the zygote.
15 const size_t kZygoteMaxMessageLength
= 8192;
17 // File descriptors initialized by the Zygote Host
18 const int kZygoteSocketPairFd
= 3;
19 const int kZygoteRendererSocketFd
= 5;
20 // This file descriptor is special. It is passed to the Zygote and a setuid
21 // helper will be called to locate the process of the Zygote on the system.
22 // This mechanism is used when multiple PID namespaces exist because of the
24 // It is very important that this file descriptor does not exist in multiple
26 // This number must be kept in sync in sandbox/linux/suid/sandbox.c
27 const int kZygoteIdFd
= 7;
29 // These are the command codes used on the wire between the browser and the
32 // Fork off a new renderer.
33 kZygoteCommandFork
= 0,
35 // Reap a renderer child.
36 kZygoteCommandReap
= 1,
38 // Check what happened to a child process.
39 kZygoteCommandGetTerminationStatus
= 2,
41 // Read a bitmask of kSandboxLinux*
42 kZygoteCommandGetSandboxStatus
= 3
45 } // namespace content
47 #endif // CONTENT_COMMON_ZYGOTE_COMMANDS_LINUX_H_