Chromium Code Reviews| Index: base/process_util_posix.cc |
| diff --git a/base/process_util_posix.cc b/base/process_util_posix.cc |
| index 018296c5628b341310b395f548cb961df35e8df0..441a9cf00fc455879b85ca1863841d6c00a1d1ed 100644 |
| --- a/base/process_util_posix.cc |
| +++ b/base/process_util_posix.cc |
| @@ -253,11 +253,7 @@ bool KillProcess(ProcessHandle process_id, int exit_code, bool wait) { |
| DCHECK_GT(process_id, 1) << " tried to kill invalid process_id"; |
| if (process_id <= 1) |
| return false; |
| - static unsigned kMaxSleepMs = 1000; |
| - unsigned sleep_ms = 4; |
| - |
| bool result = kill(process_id, SIGTERM) == 0; |
| - |
| if (result && wait) { |
| int tries = 60; |
| @@ -267,6 +263,9 @@ bool KillProcess(ProcessHandle process_id, int exit_code, bool wait) { |
| tries *= 2; |
| } |
| + static const unsigned kMaxSleepMs = 1000; |
|
jar (doing other things)
2012/08/03 17:20:19
nit: No need for static. Also, declare as close a
|
| + unsigned sleep_ms = 4; |
| + |
| // The process may not end immediately due to pending I/O |
| bool exited = false; |
| while (tries-- > 0) { |