OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 class _ProcessStartStatus { | 5 class _ProcessStartStatus { |
6 int _errorCode; // Set to OS error code if process start failed. | 6 int _errorCode; // Set to OS error code if process start failed. |
7 String _errorMessage; // Set to OS error message if process start failed. | 7 String _errorMessage; // Set to OS error message if process start failed. |
8 } | 8 } |
9 | 9 |
10 | 10 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 } | 107 } |
108 | 108 |
109 OutputStream get stdin() { | 109 OutputStream get stdin() { |
110 if (_closed) { | 110 if (_closed) { |
111 throw new ProcessException("Process closed"); | 111 throw new ProcessException("Process closed"); |
112 } | 112 } |
113 return _out.outputStream; | 113 return _out.outputStream; |
114 } | 114 } |
115 | 115 |
116 bool kill() { | 116 bool kill() { |
117 if (_closed && _pid == null) { | 117 if (_closed && _pid === null) { |
118 throw new ProcessException("Process closed"); | 118 throw new ProcessException("Process closed"); |
119 } | 119 } |
120 if (_killed) { | 120 if (_killed) { |
121 return true; | 121 return true; |
122 } | 122 } |
123 if (_kill(_pid)) { | 123 if (_kill(_pid)) { |
124 _killed = true; | 124 _killed = true; |
125 return true; | 125 return true; |
126 } | 126 } |
127 return false; | 127 return false; |
(...skipping 27 matching lines...) Expand all Loading... |
155 Socket _in; | 155 Socket _in; |
156 Socket _out; | 156 Socket _out; |
157 Socket _err; | 157 Socket _err; |
158 Socket _exitHandler; | 158 Socket _exitHandler; |
159 int _pid; | 159 int _pid; |
160 bool _closed; | 160 bool _closed; |
161 bool _killed; | 161 bool _killed; |
162 bool _started; | 162 bool _started; |
163 var _exitHandlerCallback; | 163 var _exitHandlerCallback; |
164 } | 164 } |
OLD | NEW |