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 #include "base/logging.h" | |
7 #include "base/process_util.h" | 6 #include "base/process_util.h" |
8 | 7 |
9 namespace base { | 8 namespace base { |
10 | 9 |
11 void Process::Close() { | 10 void Process::Close() { |
12 process_ = 0; | 11 process_ = 0; |
13 // if the process wasn't termiated (so we waited) or the state | 12 // if the process wasn't termiated (so we waited) or the state |
14 // wasn't already collected w/ a wait from process_utils, we're gonna | 13 // wasn't already collected w/ a wait from process_utils, we're gonna |
15 // end up w/ a zombie when it does finally exit. | 14 // end up w/ a zombie when it does finally exit. |
16 } | 15 } |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 bool Process::is_current() const { | 60 bool Process::is_current() const { |
62 return process_ == GetCurrentProcessHandle(); | 61 return process_ == GetCurrentProcessHandle(); |
63 } | 62 } |
64 | 63 |
65 // static | 64 // static |
66 Process Process::Current() { | 65 Process Process::Current() { |
67 return Process(GetCurrentProcessHandle()); | 66 return Process(GetCurrentProcessHandle()); |
68 } | 67 } |
69 | 68 |
70 } // namspace base | 69 } // namspace base |
OLD | NEW |