diff options
author | rvargas <rvargas@chromium.org> | 2014-12-01 18:46:36 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-02 02:47:52 +0000 |
commit | c40cfc6a9be2e7ee84ce5b628341e7e6439da068 (patch) | |
tree | 1556f4e488e8f00efa669dfc8d7f4f9466b97312 /base/process/launch.h | |
parent | f89bc7547ea22c17050a69aee4103a2213925989 (diff) | |
download | chromium_src-c40cfc6a9be2e7ee84ce5b628341e7e6439da068.zip chromium_src-c40cfc6a9be2e7ee84ce5b628341e7e6439da068.tar.gz chromium_src-c40cfc6a9be2e7ee84ce5b628341e7e6439da068.tar.bz2 |
Define a new version of LaunchProcess that returns a Process.
LaunchProcess should not return raw handles. However, there are too many
callers to be able to change the code in a single CL. Instead, this CL
defines the function that returns the right type of object and allows
consumers to be updated in small CLs.
BUG=417532
Review URL: https://codereview.chromium.org/759833003
Cr-Commit-Position: refs/heads/master@{#306333}
Diffstat (limited to 'base/process/launch.h')
-rw-r--r-- | base/process/launch.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/base/process/launch.h b/base/process/launch.h index 6134622..06abb29 100644 --- a/base/process/launch.h +++ b/base/process/launch.h @@ -144,12 +144,7 @@ struct BASE_EXPORT LaunchOptions { // Launch a process via the command line |cmdline|. // See the documentation of LaunchOptions for details on |options|. // -// Returns true upon success. -// -// Upon success, if |process_handle| is non-null, it will be filled in with the -// handle of the launched process. NOTE: In this case, the caller is -// responsible for closing the handle so that it doesn't leak! -// Otherwise, the process handle will be implicitly closed. +// Returns a valid Process upon success. // // Unix-specific notes: // - All file descriptors open in the parent process will be closed in the @@ -159,6 +154,11 @@ struct BASE_EXPORT LaunchOptions { // parent's stdout and stderr. // - If the first argument on the command line does not contain a slash, // PATH will be searched. (See man execvp.) +BASE_EXPORT Process LaunchProcess(const CommandLine& cmdline, + const LaunchOptions& options); + +// Deprecated version. +// TODO(rvargas) crbug.com/417532: Remove this after migrating all consumers. BASE_EXPORT bool LaunchProcess(const CommandLine& cmdline, const LaunchOptions& options, ProcessHandle* process_handle); |