Commit Graph

36 Commits

Author SHA1 Message Date
ajohnsen@google.com 8fdf9b8ee6 Use correct output encoding in Process.runSync.
BUG=https://code.google.com/p/dart/issues/detail?id=13149
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//23528006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27283 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 10:33:53 +00:00
floitsch@google.com 35d7140e66 Remove Encoding-enum from dart:io and add interface in dart:convert.
BUG= http://dartbug.com/6284
BUG= http://dartbug.com/7966
R=nweiz@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//22872012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26632 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 10:37:25 +00:00
sgjesse@google.com 959456533f Add Process.runSync for running processes synchronously
BUG=http://dartbug.com/1707

R=whesse@google.com

Review URL: https://codereview.chromium.org//21816002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26052 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-13 14:12:31 +00:00
ajohnsen@google.com f7d1f50329 Remove _BufferList from dart:io and now use BytesBuilder.
BUG=
R=whesse@google.com

Review URL: https://codereview.chromium.org//18031023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24941 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-12 10:39:02 +00:00
ajohnsen@google.com e01bcbaa0d Include parent environment by default, add option to not, for Process.
BUG=https://code.google.com/p/dart/issues/detail?id=9294,https://code.google.com/p/dart/issues/detail?id=9295
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//17261026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24262 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-21 06:44:55 +00:00
ajohnsen@google.com ff7d45d16f Always escape " in Process on Windows.
BUG=https://code.google.com/p/dart/issues/detail?id=10895
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//17447015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24232 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-20 14:50:33 +00:00
sgjesse@google.com 0cd11fcdc3 Remove Encoding.BINARY
THe Encoding.BINARY was a bad idea. It is now removed and null is used to indicate binary result from Process.run.

R=ajohnsen@google.com
BUG=

Review URL: https://codereview.chromium.org//16959004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23977 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-13 13:06:11 +00:00
sgjesse@google.com c2d41fb1ba Add support for binary stdout/stderr data when using Process.run
R=ajohnsen@google.com
BUG=http://dartbug.com/9167

Review URL: https://codereview.chromium.org//16309014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23962 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-13 10:27:54 +00:00
ajohnsen@google.com e2350a610b Temporary, only escape quotes if run in shell.
This gets pub to pass. This patch should be reverted at some point.

BUG=

Review URL: https://codereview.chromium.org//15861004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23150 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-24 14:14:45 +00:00
ajohnsen@google.com 686cebef6e Use correct path escape on Windows, for Process.
BUG=

Review URL: https://codereview.chromium.org//15782003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23148 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-24 13:34:27 +00:00
ajohnsen@google.com 87ea640826 Remove ProcessOptions and make the options named arguments.
This also removed Process.runShell and adds a new flag: runInShell.

BUG=
R=kustermann@google.com, nweiz@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//15883003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23131 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-24 11:03:40 +00:00
sgjesse@google.com 732556a48d Fix patch file return types
TBR=ajohnsen@google.com
BUG=

Review URL: https://codereview.chromium.org//13933021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21615 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-17 11:10:21 +00:00
sgjesse@google.com cf64f0ad79 Add access to process id for both current process and processes started
BUG=https://code.google.com/p/dart/issues/detail?id=9129

R=ajohnsen@google.com

Review URL: https://codereview.chromium.org//14322011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21611 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-17 10:15:29 +00:00
floitsch@google.com bebe3ac2cd Refactor List.setRange function.
Review URL: https://codereview.chromium.org//13863012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21452 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 13:52:29 +00:00
ajohnsen@google.com ea312dd9e3 Also wrap stdin/stdout/stderr on Process.
BUG=https://code.google.com/p/dart/issues/detail?id=9439

Review URL: https://codereview.chromium.org//13929002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21132 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-09 06:21:17 +00:00
floitsch@google.com bef8ebb5f6 Add Iterable.fold (and Stream.fold) which replace reduce.
For now this is just a copy. In a next step we will change the behavior of
`reduce`.

BUG= http://dartbug.com/9536

Review URL: https://codereview.chromium.org//13548002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20978 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 16:12:40 +00:00
sgjesse@google.com e10bc2d3e0 Reapply "Add a sleep function to dart:io"
This reapplies r20952, r20953, r20954 together with hiding sleep from
dart:io in a number of tests.

R=ager@google.com

Review URL: https://codereview.chromium.org//13704003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20964 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 13:04:26 +00:00
sgjesse@google.com 22a06ceeea Revert r20952, r20953, r20954
Too many failures due to conflicting top level sleep methods.

TBR=ager@google.com

BUG=

Review URL: https://codereview.chromium.org//13565005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20955 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 10:06:56 +00:00
sgjesse@google.com 43efc42bc5 Fix analyze api test failure
TBR=ager@google.com

Review URL: https://codereview.chromium.org//13568004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20954 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 09:52:30 +00:00
sgjesse@google.com b81606254e Add a sleep function to dart:io
The sleep function is a top-level function.

R=ager@google.com

BUG=https://code.google.com/p/dart/issues/detail?id=9254

Review URL: https://codereview.chromium.org//13641005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20952 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 09:35:37 +00:00
floitsch@google.com dd48256fe5 Remove deprecated StringBuffer.add, addAll and addCharCode.
Review URL: https://codereview.chromium.org//12473003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19690 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-08 13:07:18 +00:00
floitsch@google.com 51212d24ed Remove deprecated ms arguments for Timer and Future.
Review URL: https://codereview.chromium.org//12342014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19220 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 13:24:12 +00:00
lrn@google.com 6b4f4b1bab Change new List(n) to return fixed length list.
Deprecate List.fixedLength, add List.filled.

Make Iterable.toList and List.from take "growable" argument,
defaulting to false.

Review URL: https://codereview.chromium.org//12328104

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19112 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 08:45:04 +00:00
lrn@google.com 3c0ac360e7 Remove deprecated string features.
Make String.codeUnits return a List.

Review URL: https://codereview.chromium.org//12282038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18960 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-25 10:48:09 +00:00
sgjesse@google.com 488b016a2f Merge IO v2 branch to bleeding edge
R=ager@google.com, ajohnsen@google.com, whesse@google.com

BUG=

Review URL: https://codereview.chromium.org//12316036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18820 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-21 11:58:11 +00:00
ager@google.com 91514e50e0 Remove accidental addition of new stream API in dart:io.
R=ajohnsen@google.com
BUG=

Review URL: https://codereview.chromium.org//11823050

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16903 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-10 08:43:56 +00:00
floitsch@google.com 4a7dfd2da3 Big merge from experimental to bleeding edge.
Review URL: https://codereview.chromium.org//11783009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16687 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 11:23:16 +00:00
ager@google.com 6d0f985432 Add exitCode setter to set the exit code returned by the Dart VM
standalone binary on normal termination.

This is needed to be able to set the exit code without cutting
off pending asynchronous operations.

R=sgjesse@google.com,rnystrom@google.com
BUG=

Review URL: https://codereview.chromium.org//11665004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16435 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 10:36:52 +00:00
ager@google.com abb1941544 Fix closing of process stdin on Process.run.
R=sgjesse@google.com
BUG=dartbug/7473

Review URL: https://codereview.chromium.org//11614024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16244 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 06:18:54 +00:00
ager@google.com c44170ebd5 Reapply change to use system code page on Windows to fix Pub.
This time with correct null termination of the char* that
we convert.

R=sgjesse@google.com
BUG=dartbug.com/7180

Review URL: https://codereview.chromium.org//11472032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15860 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-07 20:14:37 +00:00
rnystrom@google.com cf5ab6030e Revert "By default use current code page on Windows for decoding string"
This reverts commit c247cd299958d0ee713dcfef8aaf44d230a3a7e0.

Revert "Fix memory leaks in system string patch"

This reverts commit 5e533a0c383518fc1851fbdc01a796f7d6b077f8.

Review URL: https://codereview.chromium.org//11446067

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15854 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-07 18:49:52 +00:00
ager@google.com 66f08dcabf By default use current code page on Windows for decoding string
data from processes.

R=sgjesse@google.com
BUG=dartbug.com/7180

Review URL: https://codereview.chromium.org//11475026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15844 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-07 12:51:49 +00:00
ager@google.com 927aa5670c Include command in ProcessException.
R=sgjesse@google.com
BUG=dartbug.com/4060

Review URL: https://codereview.chromium.org//11417028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15010 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-16 13:03:29 +00:00
floitsch@google.com 8e6f238f86 a === b -> identical(a, b)
Replace === null with == null.

BUG=http://dartbug.com/6380

Review URL: https://codereview.chromium.org//11361190

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14794 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 17:19:58 +00:00
ager@google.com 23d7b313e2 Remember to close the exitHandler when processes have received
their exit code.

R=sgjesse@google.com
BUG=

Review URL: https://codereview.chromium.org//11361008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14337 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-31 13:14:21 +00:00
ager@google.com aac030e777 Use patching for dart:io.
This allows the tools such as dartdoc to operate on dart:io
in the same way as it does with other code and allows the
implemenation of parts of dart:io for dart2js if we ever
want to do that.

The current patching is very VM specific. I have only moved
stuff to patch files when they actually need to be. For
Process and Socket everything has to be moved because they
use native fields. For the rest, only the individual native
calls have been put in patch files.

R=sgjesse@google.com,ajohnsen@google.com
BUG=

Review URL: https://codereview.chromium.org//11337019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14259 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-30 10:32:30 +00:00