| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include <set> | 17 #include <set> |
| 18 | 18 |
| 19 #include "base/command_line.h" |
| 19 #include "base/compiler_specific.h" | 20 #include "base/compiler_specific.h" |
| 20 #include "base/debug_util.h" | 21 #include "base/debug_util.h" |
| 21 #include "base/dir_reader_posix.h" | 22 #include "base/dir_reader_posix.h" |
| 22 #include "base/eintr_wrapper.h" | 23 #include "base/eintr_wrapper.h" |
| 23 #include "base/logging.h" | 24 #include "base/logging.h" |
| 24 #include "base/platform_thread.h" | 25 #include "base/platform_thread.h" |
| 25 #include "base/process_util.h" | 26 #include "base/process_util.h" |
| 26 #include "base/rand_util.h" | 27 #include "base/rand_util.h" |
| 27 #include "base/scoped_ptr.h" | 28 #include "base/scoped_ptr.h" |
| 29 #include "base/string_util.h" |
| 28 #include "base/time.h" | 30 #include "base/time.h" |
| 29 #include "base/waitable_event.h" | 31 #include "base/waitable_event.h" |
| 30 | 32 |
| 31 #if defined(OS_MACOSX) | 33 #if defined(OS_MACOSX) |
| 32 #include <crt_externs.h> | 34 #include <crt_externs.h> |
| 33 #define environ (*_NSGetEnviron()) | 35 #define environ (*_NSGetEnviron()) |
| 34 #include "base/mach_ipc_mac.h" | 36 #include "base/mach_ipc_mac.h" |
| 35 #else | 37 #else |
| 36 extern char** environ; | 38 extern char** environ; |
| 37 #endif | 39 #endif |
| (...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 const ProcessFilter* filter) { | 892 const ProcessFilter* filter) { |
| 891 bool exited_cleanly = | 893 bool exited_cleanly = |
| 892 WaitForProcessesToExit(executable_name, wait_milliseconds, | 894 WaitForProcessesToExit(executable_name, wait_milliseconds, |
| 893 filter); | 895 filter); |
| 894 if (!exited_cleanly) | 896 if (!exited_cleanly) |
| 895 KillProcesses(executable_name, exit_code, filter); | 897 KillProcesses(executable_name, exit_code, filter); |
| 896 return exited_cleanly; | 898 return exited_cleanly; |
| 897 } | 899 } |
| 898 | 900 |
| 899 } // namespace base | 901 } // namespace base |
| OLD | NEW |