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

Side by Side Diff: base/process/launch.h

Issue 2736053003: [Android] Fix port leak in the forwarder. (Closed)
Patch Set: tedchoc comments Created 3 years, 8 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
« no previous file with comments | « no previous file | base/process/launch_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // This file contains functions for launching subprocesses. 5 // This file contains functions for launching subprocesses.
6 6
7 #ifndef BASE_PROCESS_LAUNCH_H_ 7 #ifndef BASE_PROCESS_LAUNCH_H_
8 #define BASE_PROCESS_LAUNCH_H_ 8 #define BASE_PROCESS_LAUNCH_H_
9 9
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 BASE_EXPORT bool GetAppOutput(const StringPiece16& cl, std::string* output); 255 BASE_EXPORT bool GetAppOutput(const StringPiece16& cl, std::string* output);
256 #endif 256 #endif
257 257
258 #if defined(OS_POSIX) 258 #if defined(OS_POSIX)
259 // A POSIX-specific version of GetAppOutput that takes an argv array 259 // A POSIX-specific version of GetAppOutput that takes an argv array
260 // instead of a CommandLine. Useful for situations where you need to 260 // instead of a CommandLine. Useful for situations where you need to
261 // control the command line arguments directly. 261 // control the command line arguments directly.
262 BASE_EXPORT bool GetAppOutput(const std::vector<std::string>& argv, 262 BASE_EXPORT bool GetAppOutput(const std::vector<std::string>& argv,
263 std::string* output); 263 std::string* output);
264 264
265 // Like the above POSIX-specific version of GetAppOutput, but also includes
266 // stderr.
267 BASE_EXPORT bool GetAppOutputAndError(const std::vector<std::string>& argv,
268 std::string* output);
269
265 // A version of |GetAppOutput()| which also returns the exit code of the 270 // A version of |GetAppOutput()| which also returns the exit code of the
266 // executed command. Returns true if the application runs and exits cleanly. If 271 // executed command. Returns true if the application runs and exits cleanly. If
267 // this is the case the exit code of the application is available in 272 // this is the case the exit code of the application is available in
268 // |*exit_code|. 273 // |*exit_code|.
269 BASE_EXPORT bool GetAppOutputWithExitCode(const CommandLine& cl, 274 BASE_EXPORT bool GetAppOutputWithExitCode(const CommandLine& cl,
270 std::string* output, int* exit_code); 275 std::string* output, int* exit_code);
271 #endif // defined(OS_POSIX) 276 #endif // defined(OS_POSIX)
272 277
273 // If supported on the platform, and the user has sufficent rights, increase 278 // If supported on the platform, and the user has sufficent rights, increase
274 // the current process's scheduling priority to a high priority. 279 // the current process's scheduling priority to a high priority.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 // multiple threads are running, since at the time the fork happened, the 315 // multiple threads are running, since at the time the fork happened, the
311 // threads could have been in any state (potentially holding locks, etc.). 316 // threads could have been in any state (potentially holding locks, etc.).
312 // Callers should most likely call execve() in the child soon after calling 317 // Callers should most likely call execve() in the child soon after calling
313 // this. 318 // this.
314 BASE_EXPORT pid_t ForkWithFlags(unsigned long flags, pid_t* ptid, pid_t* ctid); 319 BASE_EXPORT pid_t ForkWithFlags(unsigned long flags, pid_t* ptid, pid_t* ctid);
315 #endif 320 #endif
316 321
317 } // namespace base 322 } // namespace base
318 323
319 #endif // BASE_PROCESS_LAUNCH_H_ 324 #endif // BASE_PROCESS_LAUNCH_H_
OLDNEW
« no previous file with comments | « no previous file | base/process/launch_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698