Index: base/process_util_posix.cc |
=================================================================== |
--- base/process_util_posix.cc (revision 20014) |
+++ base/process_util_posix.cc (working copy) |
@@ -64,6 +64,12 @@ |
// entry structure. Ignores specified exit_code; posix can't force that. |
// Returns true if this is successful, false otherwise. |
bool KillProcess(ProcessHandle process_id, int exit_code, bool wait) { |
+ DCHECK(process_id > 1); |
+ if (process_id <= 1) { |
+ LOG(ERROR) << "tried to kill process_id " << process_id; |
+ return false; |
+ } |
+ |
bool result = kill(process_id, SIGTERM) == 0; |
if (result && wait) { |