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