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

Unified Diff: base/process/process.h

Issue 812543002: Update from https://crrev.com/308331 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « base/port.h ('k') | base/process/process_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/process.h
diff --git a/base/process/process.h b/base/process/process.h
index 50ccf8d8e455338bc4b25cf3ec3c1a60d479eef1..ad8f8eec888f2e7c9297a15d0d693f36af0c871e 100644
--- a/base/process/process.h
+++ b/base/process/process.h
@@ -9,6 +9,7 @@
#include "base/basictypes.h"
#include "base/move.h"
#include "base/process/process_handle.h"
+#include "base/time/time.h"
#include "build/build_config.h"
#if defined(OS_WIN)
@@ -81,6 +82,13 @@ class BASE_EXPORT Process {
// NOTE: On POSIX |result_code| is ignored.
void Terminate(int result_code);
+ // Waits for the process to exit. Returns true on success.
+ // On POSIX, if the process has been signaled then |exit_code| is set to -1.
+ bool WaitForExit(int* exit_code);
+
+ // Same as WaitForExit() but only waits for up to |timeout|.
+ bool WaitForExitWithTimeout(TimeDelta timeout, int* exit_code);
+
// A process is backgrounded when it's priority is lower than normal.
// Return true if this process is backgrounded, false otherwise.
bool IsProcessBackgrounded() const;
« no previous file with comments | « base/port.h ('k') | base/process/process_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698