| OLD | NEW |
| 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "base/process.h" | 5 #include "base/process.h" |
| 6 | 6 |
| 7 #include <sys/types.h> | 7 #include <sys/types.h> |
| 8 #include <sys/time.h> | 8 #include <sys/time.h> |
| 9 #include <sys/resource.h> | 9 #include <sys/resource.h> |
| 10 | 10 |
| 11 #include "base/process_util.h" | 11 #include "base/process_util.h" |
| 12 #include "base/logging.h" |
| 12 | 13 |
| 13 namespace base { | 14 namespace base { |
| 14 | 15 |
| 15 void Process::Close() { | 16 void Process::Close() { |
| 16 process_ = 0; | 17 process_ = 0; |
| 17 // if the process wasn't terminated (so we waited) or the state | 18 // if the process wasn't terminated (so we waited) or the state |
| 18 // wasn't already collected w/ a wait from process_utils, we're gonna | 19 // wasn't already collected w/ a wait from process_utils, we're gonna |
| 19 // end up w/ a zombie when it does finally exit. | 20 // end up w/ a zombie when it does finally exit. |
| 20 } | 21 } |
| 21 | 22 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 Process Process::Current() { | 58 Process Process::Current() { |
| 58 return Process(GetCurrentProcessHandle()); | 59 return Process(GetCurrentProcessHandle()); |
| 59 } | 60 } |
| 60 | 61 |
| 61 int Process::GetPriority() const { | 62 int Process::GetPriority() const { |
| 62 DCHECK(process_); | 63 DCHECK(process_); |
| 63 return getpriority(PRIO_PROCESS, process_); | 64 return getpriority(PRIO_PROCESS, process_); |
| 64 } | 65 } |
| 65 | 66 |
| 66 } // namspace base | 67 } // namspace base |
| OLD | NEW |