| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <dirent.h> | 5 #include <dirent.h> |
| 6 #include <errno.h> | 6 #include <errno.h> |
| 7 #include <fcntl.h> | 7 #include <fcntl.h> |
| 8 #include <signal.h> | 8 #include <signal.h> |
| 9 #include <stdlib.h> | 9 #include <stdlib.h> |
| 10 #include <sys/resource.h> | 10 #include <sys/resource.h> |
| 11 #include <sys/time.h> | 11 #include <sys/time.h> |
| 12 #include <sys/types.h> | 12 #include <sys/types.h> |
| 13 #include <sys/wait.h> | 13 #include <sys/wait.h> |
| 14 #include <unistd.h> | 14 #include <unistd.h> |
| 15 | 15 |
| 16 #include <limits> | 16 #include <limits> |
| 17 | 17 |
| 18 #include "base/basictypes.h" | 18 #include "base/basictypes.h" |
| 19 #include "base/logging.h" | 19 #include "base/logging.h" |
| 20 #include "base/platform_thread.h" | 20 #include "base/platform_thread.h" |
| 21 #include "base/process_util.h" | 21 #include "base/process_util.h" |
| 22 #include "base/scoped_ptr.h" |
| 22 #include "base/sys_info.h" | 23 #include "base/sys_info.h" |
| 23 #include "base/time.h" | 24 #include "base/time.h" |
| 24 | 25 |
| 25 const int kMicrosecondsPerSecond = 1000000; | 26 const int kMicrosecondsPerSecond = 1000000; |
| 26 | 27 |
| 27 namespace base { | 28 namespace base { |
| 28 | 29 |
| 29 int GetCurrentProcId() { | 30 int GetCurrentProcId() { |
| 30 return getpid(); | 31 return getpid(); |
| 31 } | 32 } |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 const ProcessFilter* filter) { | 361 const ProcessFilter* filter) { |
| 361 bool exited_cleanly = | 362 bool exited_cleanly = |
| 362 WaitForProcessesToExit(executable_name, wait_milliseconds, | 363 WaitForProcessesToExit(executable_name, wait_milliseconds, |
| 363 filter); | 364 filter); |
| 364 if (!exited_cleanly) | 365 if (!exited_cleanly) |
| 365 KillProcesses(executable_name, exit_code, filter); | 366 KillProcesses(executable_name, exit_code, filter); |
| 366 return exited_cleanly; | 367 return exited_cleanly; |
| 367 } | 368 } |
| 368 | 369 |
| 369 } // namespace base | 370 } // namespace base |
| OLD | NEW |