Rico Wind
38b579fa78
Add tracking of open processes to the new io resource tracking.
...
I plan on refactoring the io_resource_info.dart file a bit in a follow up, but I keept this simple
I also plan on adding some sort of sanity checking when the vm exits, to make sure
all 3 maps are empty (in debug mode)
This fixes issue #24314 , before we would hold on to process that failed to start
running in the _processes map.
Closes #24314
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//1331033003 .
2015-09-14 12:54:36 +02:00
sgjesse@google.com
5973b2c422
Make the construction of a ProcessResult public
...
There was really no need for it to be a private implementation.
BUG=http://dartbug.com/23070
R=lrn@google.com
Review URL: https://codereview.chromium.org//1068803002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44935 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-07 13:05:45 +00:00
sgjesse@google.com
6ba8c7bd7f
Fix another type bug in r43455
...
TBR=lrn@google.com
BUG=
Review URL: https://codereview.chromium.org//899823002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43459 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-04 10:13:11 +00:00
sgjesse@google.com
a99617c254
Fix type bug in r43455
...
TBR=lrn@google.com
BUG=
Review URL: https://codereview.chromium.org//901523002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43456 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-04 08:45:23 +00:00
sgjesse@google.com
833e5d9aee
Add support for killing a process with a given PID to dart:io
...
R=lrn@google.com , kustermann@google.com
BUG=
Review URL: https://codereview.chromium.org//895623002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43455 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-04 08:20:33 +00:00
sgjesse@google.com
9aa4805e21
Add an option for starting a detached process with stdio connected
...
R=lrn@google.com , kustermann@google.com
BUG=
Review URL: https://codereview.chromium.org//890633002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43393 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 13:38:38 +00:00
sgjesse@google.com
f6a10fbdf1
Add support for starting a detached process
...
BUG=http://dartbug.com/20970
R=kustermann@google.com , lrn@google.com
Review URL: https://codereview.chromium.org//798743004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43070 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-22 11:49:39 +00:00
zra@google.com
306ef8dd75
Fixes leak in Process.runSync().
...
This removes the call to _stdin._sink.destroy()
from my previous CL, which broke a test.
stdin is closed by the native implementation.
Closing again shouldn't cause a problem, but
it looks like destroy() attempts to do a lot
more than that.
OTOH adding the remove call is sufficient to
fix the leak, so let's just stick with that.
R=iposva@google.com
Review URL: https://codereview.chromium.org//687163004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41395 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-29 14:32:30 +00:00
zra@google.com
4e15424820
Reverts 41378 for test failure.
...
Review URL: https://codereview.chromium.org//688443005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41386 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-29 01:57:22 +00:00
zra@google.com
2bb9c19ab8
Fixes memory leak in Process.runSync()
...
This was introduced in 36665 by https://codereview.chromium.org/307503002/
R=iposva@google.com
Review URL: https://codereview.chromium.org//690513002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41378 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 23:02:54 +00:00
johnmccutchan@google.com
435c6ad7ac
Reduce service isolate startup time from ~80ms to ~30ms
...
- Get access to dart:io internal signal listening function using API instead of mirrors.
- Service isolate can start with service deactivated.
- Load Observatory front end resources only when service activated.
- Do not execute Dart Service code until service is activated.
- Register live isolates when service is activated.
- Startup refactored to allow for future use of script snapshots.
R=asiva@google.com
Review URL: https://codereview.chromium.org//533073005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40124 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-10 22:38:33 +00:00
johnmccutchan@google.com
1f62dad54d
Add Proces owner of socket and fix printing of non-network sockets
...
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//300883002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36729 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-28 07:15:02 +00:00
johnmccutchan@google.com
a71fa873b1
Add processes to Observatory
...
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//307503002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36665 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-27 11:20:30 +00:00
ajohnsen@google.com
03429c2ee6
Allow internal usage of SIGQUIT signal listening.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//262463002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35616 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-01 08:01:09 +00:00
iposva@google.com
090e15d537
Do not try to move lines around after test!
...
- Fix typo in field name.
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//233313005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34935 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 17:58:47 +00:00
iposva@google.com
9adfe60489
- Apply review comments from https://codereview.chromium.org/232223004/
...
- Use isWindows where appropriate.
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//233093004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34934 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 17:49:31 +00:00
iposva@google.com
566ec5d5b9
- Do not keep the environment alive past the process spawn.
...
- Avoid creation of many temp objects while creating the process
environment.
- "if (identical(true, value))" makes no sense.
R=asiva@google.com
Review URL: https://codereview.chromium.org//232223004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34907 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 00:15:47 +00:00
ajohnsen@google.com
09a4f24413
Add exitCode getter counterpart to the existing setter in dart:io.
...
BUG=https://code.google.com/p/dart/issues/detail?id=16217
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//200233002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33737 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-17 10:40:19 +00:00
ajohnsen@google.com
c93bb293c5
Fix signal handler in checked mode..
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//130893010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32424 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-07 13:19:23 +00:00
ajohnsen@google.com
2f60129fb0
Document ProcessSignal::watch.
...
We now also allow watching for SIGTERM.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//149253013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32416 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-07 09:41:38 +00:00
sgjesse@google.com
a89aa53071
Make the Platform.environment return value an unmodifiable map
...
R=ajohnsen@google.com , kustemann@google.com
BUG=http://dartbug.com/15872
Review URL: https://codereview.chromium.org//123263003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31468 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-06 10:18:22 +00:00
ajohnsen@google.com
38d0fad2c7
Signal handling, take 2.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//119093007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31276 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-19 15:07:48 +00:00
ajohnsen@google.com
f24f568571
Revert "Signal handling."
...
This reverts commit r31270.
BUG=
Review URL: https://codereview.chromium.org//105083009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31275 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-19 14:03:15 +00:00
ajohnsen@google.com
e8d9794c70
Signal handling.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//108003009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31270 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-19 13:08:26 +00:00
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