OLD | NEW |
---|---|
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BROWSER_ZYGOTE_HOST_LINUX_H_ | 5 #ifndef CONTENT_BROWSER_ZYGOTE_HOST_LINUX_H_ |
6 #define CONTENT_BROWSER_ZYGOTE_HOST_LINUX_H_ | 6 #define CONTENT_BROWSER_ZYGOTE_HOST_LINUX_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <unistd.h> | 9 #include <unistd.h> |
10 | 10 |
11 #include <string> | 11 #include <string> |
(...skipping 13 matching lines...) Expand all Loading... | |
25 | 25 |
26 // The zygote host is the interface, in the browser process, to the zygote | 26 // The zygote host is the interface, in the browser process, to the zygote |
27 // process. | 27 // process. |
28 class ZygoteHost { | 28 class ZygoteHost { |
29 public: | 29 public: |
30 // Returns the singleton instance. | 30 // Returns the singleton instance. |
31 static ZygoteHost* GetInstance(); | 31 static ZygoteHost* GetInstance(); |
32 | 32 |
33 void Init(const std::string& sandbox_cmd); | 33 void Init(const std::string& sandbox_cmd); |
34 | 34 |
35 // Tries to start a renderer process. Returns its pid on success, otherwise | 35 // Tries to start a renderer process. Returns its pid on success, otherwise |
Evan Martin
2011/06/24 18:57:33
Comment is now wrong: "renderer process"
Brad Chen
2011/06/25 22:14:51
Done.
| |
36 // base::kNullProcessHandle; | 36 // base::kNullProcessHandle; |
37 pid_t ForkRenderer(const std::vector<std::string>& command_line, | 37 pid_t ForkRequest(const std::vector<std::string>& command_line, |
38 const base::GlobalDescriptors::Mapping& mapping); | 38 const base::GlobalDescriptors::Mapping& mapping, |
39 const std::string& process_type); | |
39 void EnsureProcessTerminated(pid_t process); | 40 void EnsureProcessTerminated(pid_t process); |
40 | 41 |
41 // Get the termination status (and, optionally, the exit code) of | 42 // Get the termination status (and, optionally, the exit code) of |
42 // the process. |exit_code| is set to the exit code of the child | 43 // the process. |exit_code| is set to the exit code of the child |
43 // process. (|exit_code| may be NULL.) | 44 // process. (|exit_code| may be NULL.) |
44 base::TerminationStatus GetTerminationStatus(base::ProcessHandle handle, | 45 base::TerminationStatus GetTerminationStatus(base::ProcessHandle handle, |
45 int* exit_code); | 46 int* exit_code); |
46 | 47 |
47 // These are the command codes used on the wire between the browser and the | 48 // These are the command codes used on the wire between the browser and the |
48 // zygote. | 49 // zygote. |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
89 base::Lock control_lock_; | 90 base::Lock control_lock_; |
90 pid_t pid_; | 91 pid_t pid_; |
91 bool init_; | 92 bool init_; |
92 bool using_suid_sandbox_; | 93 bool using_suid_sandbox_; |
93 std::string sandbox_binary_; | 94 std::string sandbox_binary_; |
94 bool have_read_sandbox_status_word_; | 95 bool have_read_sandbox_status_word_; |
95 int sandbox_status_; | 96 int sandbox_status_; |
96 }; | 97 }; |
97 | 98 |
98 #endif // CONTENT_BROWSER_ZYGOTE_HOST_LINUX_H_ | 99 #endif // CONTENT_BROWSER_ZYGOTE_HOST_LINUX_H_ |
OLD | NEW |