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

Unified Diff: runtime/bin/builtin.dart

Issue 8525002: Provide access to stdin, stdout and stderr (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed issue with Dart not stopping Created 9 years, 1 month 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 | runtime/bin/process_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/builtin.dart
diff --git a/runtime/bin/builtin.dart b/runtime/bin/builtin.dart
index adc1c636d1b0c6cd01d6aea2276b20154954af51..45bac8eb16420fa044f5d5d36376605b098156a5 100644
--- a/runtime/bin/builtin.dart
+++ b/runtime/bin/builtin.dart
@@ -15,6 +15,33 @@ void exit(int status) {
_exit(status);
}
+Socket _stdin ;
Mads Ager (google) 2011/11/11 11:37:36 Remove space before ';'.
+OutputStream get stdin() {
+ if (_stdin == null) {
+ _stdin = new _Socket._internalReadOnly();
+ _stdin._id = 0;
+ }
+ return _stdin.inputStream;
+}
+
+Socket _stdout;
+OutputStream get stdout() {
+ if (_stdout == null) {
+ _stdout = new _Socket._internalWriteOnly();
+ _stdout._id = 1;
+ }
+ return _stdout.outputStream;
+}
+
+Socket _stderr;
+OutputStream get stderr() {
+ if (_stderr == null) {
+ _stderr = new _Socket._internalWriteOnly();
+ _stderr._id = 2;
+ }
+ return _stderr.outputStream;
+}
+
_exit(int status) native "Exit";
class _Logger {
« no previous file with comments | « no previous file | runtime/bin/process_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698