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

Side by Side Diff: tests/standalone/io/process_detached_script.dart

Issue 890633002: Add an option for starting a detached process with stdio connected (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 5 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/io/process.dart ('k') | tests/standalone/io/process_detached_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 // Simple script hanging for testing a detached process. 5 // Simple script hanging for testing a detached process.
6 6
7 import 'dart:io';
7 import 'dart:isolate'; 8 import 'dart:isolate';
8 9
9 main() { 10 void main(List<String> args) {
10 new ReceivePort().listen(print); 11 new ReceivePort().listen(print);
12
13 // If an argument 'echo' is passed echo stdin to stdout and stderr.
14 if (args.length == 1 && args[0] == 'echo') {
15 stdin.fold([], (p, e) => p..addAll(e)).then((message) {
16 stdout.add(message);
17 stderr.add(message);
18 stdout.close();
19 stderr.close();
20 });
21 }
11 } 22 }
OLDNEW
« no previous file with comments | « sdk/lib/io/process.dart ('k') | tests/standalone/io/process_detached_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698