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

Unified Diff: base/process/kill.h

Issue 957183002: Remove base::WaitForExitCode* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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/kill_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/kill.h
diff --git a/base/process/kill.h b/base/process/kill.h
index 8c0a213daf975ffe6a1d80d583617ceedfb73113..173317b0005442ee9250515490f70e379eebbf63 100644
--- a/base/process/kill.h
+++ b/base/process/kill.h
@@ -94,22 +94,6 @@ BASE_EXPORT TerminationStatus GetKnownDeadTerminationStatus(
ProcessHandle handle, int* exit_code);
#endif // defined(OS_POSIX)
-// Waits for process to exit. On POSIX systems, if the process hasn't been
-// signaled then puts the exit code in |exit_code|; otherwise it's considered
-// a failure. On Windows |exit_code| is always filled. Returns true on success,
-// and closes |handle| in any case.
-BASE_EXPORT bool WaitForExitCode(ProcessHandle handle, int* exit_code);
-
-// Waits for process to exit. If it did exit within |timeout_milliseconds|,
-// then puts the exit code in |exit_code|, and returns true.
-// In POSIX systems, if the process has been signaled then |exit_code| is set
-// to -1. Returns false on failure (the caller is then responsible for closing
-// |handle|).
-// The caller is always responsible for closing the |handle|.
-BASE_EXPORT bool WaitForExitCodeWithTimeout(ProcessHandle handle,
- int* exit_code,
- base::TimeDelta timeout);
-
// Wait for all the processes based on the named executable to exit. If filter
// is non-null, then only processes selected by the filter are waited on.
// Returns after all processes have exited or wait_milliseconds have expired.
@@ -152,6 +136,19 @@ BASE_EXPORT void EnsureProcessTerminated(Process process);
BASE_EXPORT void EnsureProcessGetsReaped(ProcessId pid);
#endif
+#if defined(OS_POSIX)
+namespace internal {
+// Implements Process::WaitForExitWithTimeout for POSIX. It lives in this file
+// because the implementation is closely related to other functions declared
danakj 2015/02/26 22:03:25 Why does this argument make sense for posix but no
rvargas (doing something else) 2015/02/27 01:54:18 Because the windows implementation has nothing to
danakj 2015/02/27 18:47:02 Granted the posix code is larger, with some helper
+// here.
+// This is not meant for consumers outside of base::Process.
danakj 2015/02/26 22:03:25 Can you still keep the whole comment that was on t
rvargas (doing something else) 2015/02/27 01:54:18 Some of that text is now irrelevant (the part abou
+bool WaitForExitCodeWithTimeout(ProcessHandle handle,
+ int* exit_code,
+ TimeDelta timeout);
+static const int kNoTimeout = -1;
danakj 2015/02/26 22:03:25 maybe you can scope this constant name a bit more.
rvargas (doing something else) 2015/02/27 01:54:18 Removed.
+} // namespace internal
+#endif // defined(OS_POSIX)
+
} // namespace base
#endif // BASE_PROCESS_KILL_H_
« no previous file with comments | « no previous file | base/process/kill_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698