Chromium Code Reviews| Index: runtime/bin/process_impl.dart |
| diff --git a/runtime/bin/process_impl.dart b/runtime/bin/process_impl.dart |
| index a6a819755d109d26e7e8875a3e95781a27b60e1f..26718fc0d889fcb5f3d6f1ab0b37651ed6d36157 100644 |
| --- a/runtime/bin/process_impl.dart |
| +++ b/runtime/bin/process_impl.dart |
| @@ -10,7 +10,7 @@ class _ProcessStartStatus { |
| } |
| -class _Process extends Process { |
| +class _Process extends NativeFieldWrapperClass1 implements Process { |
| static Future<ProcessResult> run(String path, |
| List<String> arguments, |
| [ProcessOptions options]) { |
| @@ -227,22 +227,21 @@ class _Process extends Process { |
| throw new IllegalArgumentException( |
| "Argument 'signal' must be a ProcessSignal"); |
| } |
| - if (_closed && _pid === null) { |
| - _reportError(new ProcessException("Process closed")); |
| + if (!_started) { |
| + _reportError(new ProcessException("Cannot kill process that is not started")); |
|
Søren Gjesse
2012/09/21 10:44:16
Long line.
Mads Ager (google)
2012/09/21 11:07:39
Done.
|
| return; |
| } |
| if (_ended) { |
| return; |
| } |
| - // TODO(ager): Make the actual kill operation asynchronous. |
| - if (_kill(_pid, signal._signalNumber)) { |
| + if (_kill(this, signal._signalNumber)) { |
| return; |
| } |
| _reportError(new ProcessException("Could not kill process")); |
| return; |
| } |
| - bool _kill(int pid, int signal) native "Process_Kill"; |
| + bool _kill(Process p, int signal) native "Process_Kill"; |
| void close() { |
| if (_closed) { |
| @@ -290,7 +289,6 @@ class _Process extends Process { |
| _Socket _out; |
| _Socket _err; |
| Socket _exitHandler; |
| - int _pid; |
| bool _closed; |
| bool _ended; |
| bool _started; |