OLD | NEW |
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 #include "chromeos/process_proxy/process_proxy.h" | 5 #include "chromeos/process_proxy/process_proxy.h" |
6 | 6 |
7 #include <fcntl.h> | |
8 #include <stdlib.h> | 7 #include <stdlib.h> |
9 #include <sys/ioctl.h> | 8 #include <sys/ioctl.h> |
10 | 9 |
11 #include "base/bind.h" | 10 #include "base/bind.h" |
12 #include "base/command_line.h" | 11 #include "base/command_line.h" |
13 #include "base/files/file_util.h" | 12 #include "base/files/file_util.h" |
14 #include "base/logging.h" | 13 #include "base/logging.h" |
15 #include "base/posix/eintr_wrapper.h" | 14 #include "base/posix/eintr_wrapper.h" |
16 #include "base/process/kill.h" | 15 #include "base/process/kill.h" |
17 #include "base/process/launch.h" | 16 #include "base/process/launch.h" |
18 #include "base/threading/thread.h" | 17 #include "base/threading/thread.h" |
19 #include "chromeos/process_proxy/process_output_watcher.h" | |
20 #include "third_party/cros_system_api/switches/chrome_switches.h" | 18 #include "third_party/cros_system_api/switches/chrome_switches.h" |
21 | 19 |
22 namespace { | 20 namespace { |
23 | 21 |
24 enum PipeEnd { | 22 enum PipeEnd { |
25 PIPE_END_READ, | 23 PIPE_END_READ, |
26 PIPE_END_WRITE | 24 PIPE_END_WRITE |
27 }; | 25 }; |
28 | 26 |
29 enum PseudoTerminalFd { | 27 enum PseudoTerminalFd { |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 ClearFdPair(pt_pair_); | 261 ClearFdPair(pt_pair_); |
264 ClearFdPair(shutdown_pipe_); | 262 ClearFdPair(shutdown_pipe_); |
265 } | 263 } |
266 | 264 |
267 void ProcessProxy::ClearFdPair(int* pipe) { | 265 void ProcessProxy::ClearFdPair(int* pipe) { |
268 pipe[PIPE_END_READ] = kInvalidFd; | 266 pipe[PIPE_END_READ] = kInvalidFd; |
269 pipe[PIPE_END_WRITE] = kInvalidFd; | 267 pipe[PIPE_END_WRITE] = kInvalidFd; |
270 } | 268 } |
271 | 269 |
272 } // namespace chromeos | 270 } // namespace chromeos |
OLD | NEW |