Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1682)

Unified Diff: pkg/unittest/lib/vm_config.dart

Issue 14580013: Close stdout and stderr before terminating the VM. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: . Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/lib/vm_config.dart
diff --git a/pkg/unittest/lib/vm_config.dart b/pkg/unittest/lib/vm_config.dart
index 9d2e6eae21f76ce973d7b81309bec79bcfbea3e7..97a061a45e0eb111b8d75218ecdfa57b747a2f3d 100644
--- a/pkg/unittest/lib/vm_config.dart
+++ b/pkg/unittest/lib/vm_config.dart
@@ -7,6 +7,7 @@
*/
library unittest_vm_config;
+import 'dart:async';
import 'dart:io';
import 'unittest.dart';
@@ -16,9 +17,11 @@ class VMConfiguration extends Configuration {
super.onDone(success);
exit(0);
Siggi Cherem (dart-lang) 2013/05/07 17:47:48 do you need to wait here too?
podivilov 2013/05/08 12:42:44 Usually you are not interested in the output of th
} catch (ex) {
- // A non-zero exit code is used by the test infrastructure to detect
- // failure.
- exit(1);
+ Future.wait([stdout.close(), stderr.close()]).then((_) {
+ // A non-zero exit code is used by the test infrastructure to detect
+ // failure.
+ exit(1);
+ });
}
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698