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

Side by Side Diff: content/common/zygote_commands_linux.h

Issue 10447135: Don't fork Zygote as a background process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor update Created 8 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | sandbox/linux/suid/sandbox.c » ('j') | sandbox/linux/suid/sandbox.c » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_COMMON_ZYGOTE_COMMANDS_LINUX_H_ 5 #ifndef CONTENT_COMMON_ZYGOTE_COMMANDS_LINUX_H_
6 #define CONTENT_COMMON_ZYGOTE_COMMANDS_LINUX_H_ 6 #define CONTENT_COMMON_ZYGOTE_COMMANDS_LINUX_H_
7 7
8 namespace content { 8 namespace content {
9 9
10 // Contents of the initial message sent from the zygote to the browser when it 10 // Contents of the initial message sent from the zygote to the browser when it
11 // is ready to go. 11 // is ready to go.
12 static const char kZygoteHelloMessage[] = "ZYGOTE_OK"; 12 static const char kZygoteHelloMessage[] = "ZYGOTE_OK";
13 13
14 // File descriptors initialized by the Zygote Host 14 // File descriptors initialized by the Zygote Host
15 const int kZygoteSocketPairFd = 3; 15 const int kZygoteSocketPairFd = 3;
16 const int kZygoteRendererSocketFd = 5; 16 const int kZygoteRendererSocketFd = 5;
17 // This file descriptor is special. It is passed to the Zygote and a setuid 17 // This file descriptor is special. It is passed to the Zygote and a setuid
18 // helper will be called to locate the process of the Zygote on the system. 18 // helper will be called to locate the process of the Zygote on the system.
19 // This mechanism is used when multiple PID namespaces exist because of the 19 // This mechanism is used when multiple PID namespaces exist because of the
20 // setuid sandbox. 20 // setuid sandbox.
21 // It is very important that this file descriptor does not exist in multiple 21 // It is very important that this file descriptor does not exist in multiple
22 // processes. 22 // processes.
23 // This number must be kept in sync in sandbox/linux/suid/sandbox.c
Jorge Lucangeli Obes 2012/06/01 15:08:07 "in" -> "with"
23 const int kZygoteIdFd = 7; 24 const int kZygoteIdFd = 7;
24 25
25 // These are the command codes used on the wire between the browser and the 26 // These are the command codes used on the wire between the browser and the
26 // zygote. 27 // zygote.
27 enum { 28 enum {
28 // Fork off a new renderer. 29 // Fork off a new renderer.
29 kZygoteCommandFork = 0, 30 kZygoteCommandFork = 0,
30 31
31 // Reap a renderer child. 32 // Reap a renderer child.
32 kZygoteCommandReap = 1, 33 kZygoteCommandReap = 1,
33 34
34 // Check what happend to a child process. 35 // Check what happend to a child process.
35 kZygoteCommandGetTerminationStatus = 2, 36 kZygoteCommandGetTerminationStatus = 2,
36 37
37 // Read a bitmask of kSandboxLinux* 38 // Read a bitmask of kSandboxLinux*
38 kZygoteCommandGetSandboxStatus = 3 39 kZygoteCommandGetSandboxStatus = 3
39 }; 40 };
40 41
41 } // namespace content 42 } // namespace content
42 43
43 #endif // CONTENT_COMMON_ZYGOTE_COMMANDS_LINUX_H_ 44 #endif // CONTENT_COMMON_ZYGOTE_COMMANDS_LINUX_H_
OLDNEW
« no previous file with comments | « no previous file | sandbox/linux/suid/sandbox.c » ('j') | sandbox/linux/suid/sandbox.c » ('J')

Powered by Google App Engine
This is Rietveld 408576698