diff options
Diffstat (limited to 'base/process/process_posix.cc')
-rw-r--r-- | base/process/process_posix.cc | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/base/process/process_posix.cc b/base/process/process_posix.cc index a1d84e9128..ba9b5447c0 100644 --- a/base/process/process_posix.cc +++ b/base/process/process_posix.cc @@ -9,7 +9,6 @@ #include <sys/resource.h> #include <sys/wait.h> -#include "base/debug/activity_tracker.h" #include "base/files/scoped_file.h" #include "base/logging.h" #include "base/posix/eintr_wrapper.h" @@ -267,17 +266,12 @@ Process Process::DeprecatedGetProcessFromHandle(ProcessHandle handle) { return Process(handle); } -#if !defined(OS_LINUX) && !defined(OS_MACOSX) +#if !defined(OS_LINUX) // static bool Process::CanBackgroundProcesses() { return false; } -#endif // !defined(OS_LINUX) && !defined(OS_MACOSX) - -// static -void Process::TerminateCurrentProcessImmediately(int exit_code) { - _exit(exit_code); -} +#endif // !defined(OS_LINUX) bool Process::IsValid() const { return process_ != kNullProcessHandle; @@ -320,12 +314,6 @@ bool Process::Terminate(int /*exit_code*/, bool wait) const { if (result && wait) { int tries = 60; - if (RunningOnValgrind()) { - // Wait for some extra time when running under Valgrind since the child - // processes may take some time doing leak checking. - tries *= 2; - } - unsigned sleep_ms = 4; // The process may not end immediately due to pending I/O @@ -365,18 +353,15 @@ bool Process::Terminate(int /*exit_code*/, bool wait) const { } #endif // !defined(OS_NACL_NONSFI) -bool Process::WaitForExit(int* exit_code) const { +bool Process::WaitForExit(int* exit_code) { return WaitForExitWithTimeout(TimeDelta::Max(), exit_code); } -bool Process::WaitForExitWithTimeout(TimeDelta timeout, int* exit_code) const { - // Record the event that this thread is blocking upon (for hang diagnosis). - base::debug::ScopedProcessWaitActivity process_activity(this); - +bool Process::WaitForExitWithTimeout(TimeDelta timeout, int* exit_code) { return WaitForExitWithTimeoutImpl(Handle(), exit_code, timeout); } -#if !defined(OS_LINUX) && !defined(OS_MACOSX) +#if !defined(OS_LINUX) bool Process::IsProcessBackgrounded() const { // See SetProcessBackgrounded(). DCHECK(IsValid()); @@ -384,13 +369,13 @@ bool Process::IsProcessBackgrounded() const { } bool Process::SetProcessBackgrounded(bool /*value*/) { - // Not implemented for POSIX systems other than Linux and Mac. With POSIX, if - // we were to lower the process priority we wouldn't be able to raise it back - // to its initial priority. + // Not implemented for POSIX systems other than Linux. With POSIX, if we were + // to lower the process priority we wouldn't be able to raise it back to its + // initial priority. NOTIMPLEMENTED(); return false; } -#endif // !defined(OS_LINUX) && !defined(OS_MACOSX) +#endif // !defined(OS_LINUX) int Process::GetPriority() const { DCHECK(IsValid()); |