summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
Diffstat (limited to 'base')
-rw-r--r--base/process_posix.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/base/process_posix.cc b/base/process_posix.cc
index 162ba35..30ca81d 100644
--- a/base/process_posix.cc
+++ b/base/process_posix.cc
@@ -10,10 +10,17 @@ namespace base {
void Process::Close() {
process_ = 0;
+ // if the process wasn't termiated (so we waited) or the state
+ // wasn't already collected w/ a wait from process_utils, we're gonna
+ // end up w/ a zombie when it does finally exit.
}
void Process::Terminate(int result_code) {
- NOTIMPLEMENTED();
+ // result_code isn't supportable.
+ if (!process_)
+ return;
+ // Wait so we clean up the zombie
+ KillProcess(process_, result_code, true);
}
bool Process::IsProcessBackgrounded() const {