summaryrefslogtreecommitdiffstats
path: root/base/process_util_win.cc
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-22 01:15:47 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-22 01:15:47 +0000
commitfb7f9bef3ceecd5a3efb9252410f6850320462b8 (patch)
tree95cefb13965daa20689cebec67e48352be1ccfbf /base/process_util_win.cc
parent0cbd643274f17abca0efaa82036ac8ccbc695be3 (diff)
downloadchromium_src-fb7f9bef3ceecd5a3efb9252410f6850320462b8.zip
chromium_src-fb7f9bef3ceecd5a3efb9252410f6850320462b8.tar.gz
chromium_src-fb7f9bef3ceecd5a3efb9252410f6850320462b8.tar.bz2
Added linux process utilities and tests.
Review URL: http://codereview.chromium.org/7202 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3715 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/process_util_win.cc')
-rw-r--r--base/process_util_win.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/base/process_util_win.cc b/base/process_util_win.cc
index b464336..b13cbea 100644
--- a/base/process_util_win.cc
+++ b/base/process_util_win.cc
@@ -144,6 +144,12 @@ bool LaunchApp(const std::wstring& cmdline,
return true;
}
+bool LaunchApp(CommandLine& cl,
+ bool wait, bool start_hidden, ProcessHandle* process_handle) {
+ return LaunchApp(cl.command_line_string(), wait,
+ start_hidden, process_handle);
+}
+
// Attempts to kill the process identified by the given process
// entry structure, giving it the specified exit code.
// Returns true if this is successful, false otherwise.
@@ -316,6 +322,12 @@ bool WaitForProcessesToExit(const std::wstring& executable_name,
return result;
}
+bool WaitForSingleProcess(ProcessHandle handle, int wait_milliseconds) {
+ bool retval = WaitForSingleObject(handle, wait_milliseconds) == WAIT_OBJECT_0;
+ CloseHandle(handle);
+ return retval;
+}
+
bool CleanupProcesses(const std::wstring& executable_name,
int wait_milliseconds,
int exit_code,
@@ -328,7 +340,6 @@ bool CleanupProcesses(const std::wstring& executable_name,
return exited_cleanly;
}
-
///////////////////////////////////////////////////////////////////////////////
// ProcesMetrics