Index: base/process/kill.h |
diff --git a/base/process/kill.h b/base/process/kill.h |
index f81ea9090da6f6c0b794b0e0ea8f776c0fa559e1..c828c718defd88e359fccbf3ef5fed75fa8f63c6 100644 |
--- a/base/process/kill.h |
+++ b/base/process/kill.h |
@@ -67,12 +67,23 @@ BASE_EXPORT TerminationStatus GetTerminationStatus(ProcessHandle handle, |
int* exit_code); |
#if defined(OS_POSIX) |
-// Wait for the process to exit and get the termination status. See |
-// GetTerminationStatus for more information. On POSIX systems, we can't call |
-// WaitForExitCode and then GetTerminationStatus as the child will be reaped |
-// when WaitForExitCode return and this information will be lost. |
-BASE_EXPORT TerminationStatus WaitForTerminationStatus(ProcessHandle handle, |
- int* exit_code); |
+// Send a kill signal to the process and then wait for the process to exit |
+// and get the termination status. |
+// |
+// This is used in situations where it is believed that the process is dead |
+// or dying (because communication with the child process has been cut). |
+// In order to avoid erroneously returning that the process is still running |
+// because the kernel is still cleaning it up, this will wait for the process |
+// to terminate. In order to avoid the risk of hanging while waiting for the |
+// process to terminate, send a SIGKILL to the process before waiting for the |
+// termination status. |
+// |
+// Note that it is not an option to call WaitForExitCode and then |
+// GetTerminationStatus as the child will be reaped when WaitForExitCode |
+// returns, and this information will be lost. |
+// |
+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 |