Chromium Code Reviews| Index: runtime/bin/process_impl.dart |
| diff --git a/runtime/bin/process_impl.dart b/runtime/bin/process_impl.dart |
| index da02ccb578e0922743b2f3bf77c98b88861f9acf..f7d3076cf8f214df47da59cd8e540897fa36fbb9 100644 |
| --- a/runtime/bin/process_impl.dart |
| +++ b/runtime/bin/process_impl.dart |
| @@ -58,13 +58,15 @@ class _Process implements Process { |
| // Setup an exit handler to handle internal cleanup and possible |
| // callback when a process terminates. |
| _exitHandler.dataHandler = () { |
| - final int EXIT_DATA_SIZE = 8; |
| + final int EXIT_DATA_SIZE = 12; |
| List<int> exitDataBuffer = new List<int>(EXIT_DATA_SIZE); |
| InputStream input = _exitHandler.inputStream; |
| int exitDataRead = 0; |
| int exitCode(List<int> ints) { |
| - return ints[4] + (ints[5] << 8) + (ints[6] << 16) + (ints[7] << 24); |
| + var code = |
| + ints[4] + (ints[5] << 8) + (ints[6] << 16) + (ints[7] << 24); |
| + return (ints[8] == 0) ? code : -code; |
|
Søren Gjesse
2011/11/09 15:12:45
Should we assert that ints[8] is either 0 or 1 and
Mads Ager (google)
2011/11/09 15:37:11
Thanks! Done. I'm using that method to get the neg
|
| } |
| int exitPid(List<int> ints) { |