OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "services/native_support/process_impl.h" | 5 #include "services/native_support/process_impl.h" |
6 | 6 |
7 #include <fcntl.h> | 7 #include <fcntl.h> |
8 #include <stdio.h> | 8 #include <stdio.h> |
9 #include <unistd.h> | 9 #include <unistd.h> |
10 | 10 |
11 #include <algorithm> | 11 #include <algorithm> |
12 #include <limits> | 12 #include <limits> |
13 #include <utility> | 13 #include <utility> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/command_line.h" | 16 #include "base/command_line.h" |
17 #include "base/environment.h" | 17 #include "base/environment.h" |
18 #include "base/files/scoped_file.h" | 18 #include "base/files/scoped_file.h" |
19 #include "base/logging.h" | 19 #include "base/logging.h" |
20 #include "base/posix/eintr_wrapper.h" | 20 #include "base/posix/eintr_wrapper.h" |
21 #include "base/process/launch.h" | 21 #include "base/process/launch.h" |
22 #include "base/process/process.h" | 22 #include "base/process/process.h" |
23 #include "build/build_config.h" | 23 #include "build/build_config.h" |
24 #include "mojo/services/files/public/interfaces/types.mojom.h" | 24 #include "mojo/services/files/interfaces/types.mojom.h" |
25 #include "services/native_support/make_pty_pair.h" | 25 #include "services/native_support/make_pty_pair.h" |
26 #include "services/native_support/process_controller_impl.h" | 26 #include "services/native_support/process_controller_impl.h" |
27 #include "services/native_support/process_io_redirection.h" | 27 #include "services/native_support/process_io_redirection.h" |
28 | 28 |
29 namespace native_support { | 29 namespace native_support { |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 class SetsidPreExecDelegate : public base::LaunchOptions::PreExecDelegate { | 33 class SetsidPreExecDelegate : public base::LaunchOptions::PreExecDelegate { |
34 public: | 34 public: |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 callback.Run(mojo::files::Error::UNKNOWN); | 230 callback.Run(mojo::files::Error::UNKNOWN); |
231 return; | 231 return; |
232 } | 232 } |
233 | 233 |
234 new ProcessControllerImpl(worker_runner_, process_controller.Pass(), | 234 new ProcessControllerImpl(worker_runner_, process_controller.Pass(), |
235 process.Pass(), std::move(process_io_redirection)); | 235 process.Pass(), std::move(process_io_redirection)); |
236 callback.Run(mojo::files::Error::OK); | 236 callback.Run(mojo::files::Error::OK); |
237 } | 237 } |
238 | 238 |
239 } // namespace native_support | 239 } // namespace native_support |
OLD | NEW |