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

Unified Diff: base/process_util.h

Issue 9689081: Add comments and fix a potential leak in LaunchProcess. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Missing matching call to CloseHandle(hThread) Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/process_util_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process_util.h
diff --git a/base/process_util.h b/base/process_util.h
index 1968f8be660f03fd72b2576605c3039164d63e20..d16012152fe0ac1c9b38a07f50cd8853b58149f0 100644
--- a/base/process_util.h
+++ b/base/process_util.h
@@ -259,7 +259,9 @@ struct LaunchOptions {
// If true, use an empty string for the desktop name.
bool empty_desktop_name;
- // If non-NULL, launches the application in that job object.
+ // If non-NULL, launches the application in that job object. The process will
+ // be terminated immediately and LaunchProcess() will fail if assignment to
+ // the job object fails.
HANDLE job_handle;
#else
// If non-NULL, set/unset environment variables.
@@ -322,7 +324,9 @@ struct LaunchOptions {
// Launch a process via the command line |cmdline|.
// See the documentation of LaunchOptions for details on |options|.
//
-// If |process_handle| is non-NULL, it will be filled in with the
+// 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.
« no previous file with comments | « no previous file | base/process_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698