| 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 // Process test program to test process communication. | 5 // Process test program to test process communication. |
| 6 // | 6 // |
| 7 // VMOptions= | 7 // VMOptions= |
| 8 // VMOptions=--short_socket_read | 8 // VMOptions=--short_socket_read |
| 9 // VMOptions=--short_socket_write | 9 // VMOptions=--short_socket_write |
| 10 // VMOptions=--short_socket_read --short_socket_write | 10 // VMOptions=--short_socket_read --short_socket_write |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 } | 37 } |
| 38 received += buffer.length; | 38 received += buffer.length; |
| 39 if (received == BUFFERSIZE) { | 39 if (received == BUFFERSIZE) { |
| 40 process.close(); | 40 process.close(); |
| 41 } | 41 } |
| 42 } | 42 } |
| 43 | 43 |
| 44 input.dataHandler = readData; | 44 input.dataHandler = readData; |
| 45 } | 45 } |
| 46 | 46 |
| 47 bool written = output.write(data, 0, BUFFERSIZE, dataWritten); | 47 output.write(data); |
| 48 if (written) { | 48 dataWritten(); |
| 49 dataWritten(); | |
| 50 } | |
| 51 } | 49 } |
| 52 | 50 |
| 53 static void testMain() { | 51 static void testMain() { |
| 54 testExit(); | 52 testExit(); |
| 55 } | 53 } |
| 56 } | 54 } |
| 57 | 55 |
| 58 main() { | 56 main() { |
| 59 ProcessStderrTest.testMain(); | 57 ProcessStderrTest.testMain(); |
| 60 } | 58 } |
| OLD | NEW |