Index: tests/standalone/io/process_sync_script.dart |
diff --git a/tests/standalone/io/process_sync_script.dart b/tests/standalone/io/process_sync_script.dart |
index d8aab9c7b2858f6bc92203e377d2c7a6128d3ad4..5369124251414bd7ae0f4fee844dae37806d35ec 100644 |
--- a/tests/standalone/io/process_sync_script.dart |
+++ b/tests/standalone/io/process_sync_script.dart |
@@ -4,6 +4,7 @@ |
// |
// Utility script to generate some output on stdout and stderr. |
+import "dart:async"; |
import "dart:math"; |
import "dart:io"; |
@@ -20,5 +21,7 @@ main() { |
stdout.write(stdoutBlock); |
stderr.write(stderrBlock); |
} |
- exit(int.parse(options.arguments[3])); |
+ Future.wait([stdout.close(), stderr.close()]).then((_) { |
+ exit(int.parse(options.arguments[3])); |
+ }); |
} |