Commit Graph

27 Commits

Author SHA1 Message Date
whesse@google.com bb7c2d9969 Fix dart:io Process class on the Windows plaform, which had some race conditions.
BUG=dart:4414

Review URL: https://chromiumcodereview.appspot.com//10825473

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11050 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 14:24:22 +00:00
whesse@google.com 99e64f84c2 Fix dart:io Process callback on Windows platfrom calling convention from cdecl to stdcall.
BUG=dart:4414

Review URL: https://chromiumcodereview.appspot.com//10836337

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10946 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 12:32:19 +00:00
cshapiro@google.com 772a399cab Emit symbol maps for compiled code for use by the Linux perf tool.
Review URL: https://chromiumcodereview.appspot.com//10831005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9922 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-26 00:21:25 +00:00
whesse@google.com d05e40212a IO: Fix error in Process exit handling.
BUG=3639
TEST=

Review URL: https://chromiumcodereview.appspot.com//10697066

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9336 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-03 10:16:25 +00:00
ajohnsen@google.com c54800f942 Give Process.kill an optional argument to specify which signal to send.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10545134

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8541 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 12:00:50 +00:00
ager@google.com eb9744b3bb Process exit code handling reworked for Windows.
Simplify the code by relying on the builtin Windows thread pool
to wait for all process handles. The additional benefit is that
we can have an arbitrary number of processes and are not restricted
by the max number of handles for WaitForMultipleObjects.

R=sgjesse@google.com
BUG=dartbug:1450
TEST=standalone/io/process_many_test.dart

Review URL: https://chromiumcodereview.appspot.com//10440044

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7995 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-25 13:10:03 +00:00
ager@google.com 493a76dd40 Support passing an environment variable map to child processes.
Fix minor type warning in test.

Reapplication after MacOS bug fix.

R=sgjesse@google.com
BUG=dartbug.com/2193
TEST=

Review URL: https://chromiumcodereview.appspot.com//10166029

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6827 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-23 07:54:10 +00:00
ager@google.com c5d347fcbc Revert "Support passing an environment variable map to child processes."
Apparently the code or the test is broken on Mac.

R=sgjesse@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10163004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6795 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-20 12:53:19 +00:00
ager@google.com ee81b6f0a1 Support passing an environment variable map to child processes.
Fix minor type warning in test.

R=sgjesse@google.com
BUG=dartbug.com/2193
TEST=

Review URL: https://chromiumcodereview.appspot.com//10127008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6794 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-20 12:38:57 +00:00
ager@google.com 357588d0c9 Change quoting in Process implementation on Windows.
Only quote command and arguments if they contain a space or a tab.
This seems consistent with the way it is handled in other systems.

R=antonm@google.com,sgjesse@google.com

Review URL: https://chromiumcodereview.appspot.com//9701061

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5522 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-15 15:33:06 +00:00
ager@google.com c96189c6a9 Wrap all arguments passed to processes in "" on Windows.
I'm not 100% sure that this is what we want. I'll dig into
what other systems are doing tomorrow.

This could make the test scripts work on Windows for Dartium.

Updated windows test binary as well.

R=antonm@google.com,sgjesse@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//9699032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5472 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-14 16:50:16 +00:00
ager@google.com 37499dce81 Rework Windows process handling.
- Use only one thread to wait for multiple process objects.
- Fix issue where reading from a closed pipe would print an
  error message on stderr.
- Remove the need to go to dart before removing a processinfo
  object from the list. Sometimes you never get there so we
  have to remove the process info object always.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//9310053

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3844 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-02 13:47:42 +00:00
ager@google.com ed3338dbae Wait for exit-code thread to terminate before terminating main.
The code is identical on Linux and Mac. Currently unimplemented on
Windows because I had to revert my change to the exit code handling
on Windows. I will revive that change tomorrow and implement this
as part of that change.

R=iposva@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//9315037

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3801 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-01 18:16:45 +00:00
ager@google.com 7031be2291 Revert "Changes to the process implementation."
There is a race-condition on Windows and exit handling when a process
has been closed is incorrect.

R=sgjesse@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//9307033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3790 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-01 14:19:25 +00:00
ager@google.com 6b5815328c Changes to the process implementation.
- Make the list of active processes thread safe on Windows.
- Use only one thread on Windows to detect process termination.
- Stop the process termination thread when the standalone VM terminates.

R=sgjesse@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//9307003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3780 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-01 09:09:23 +00:00
ager@google.com 607eea1402 Cleanup gypi mess.
My change that introduced a platform directory shared between vm and bin runtime components did not correctly update gypi files.

BUG=
TEST=

Review URL: http://codereview.chromium.org//9124030

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3155 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-10 16:50:14 +00:00
ager@google.com c4c92c4f7b Introduce runtime/platform directory for code shared between vm
and bin.

Cleaned up globals.h. Common parts now in platform/globals.h.
vm specific parts are in vm/globals.h and bin/globals.h is gone.

R=sgjesse@google.com,iposva@google.com
BUG=
TEST=

Review URL: http://codereview.chromium.org//9114008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3030 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-06 11:28:21 +00:00
ajohnsen@google.com c2b45bf04e Add optional workingDirectory argument to Process.start.
Review URL: http://codereview.chromium.org//9108008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2987 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-05 09:54:54 +00:00
ager@google.com 47a7c9bcdb Undo change that converted exit code 255 to -1.
It seems that most systems do not perform that conversion and it
could therefore be confusing.

Simplify the crash handling in the test scripts accordingly.

R=sgjesse@google.com
BUG=
TEST=

Review URL: http://codereview.chromium.org//8989011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2620 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-20 10:06:35 +00:00
sgjesse@google.com 04bc611751 Handle stdin/stdout/stderr on Windows
Create handle objects for stdin/stdout/stderr. For Mac OS and
Linus the file descriptor numbers are used but on Windows the
handles are wrapped in an object.

The system handles for stdin/stdout/stderr on Windows does not
support overlapped IO. To mittigate this the write calls are
performed synchronously and the read calls are preformed in a
thread which posts the result through the completion potr where
it is handled as if it originated from overlapped IO through the
completion port. For now each call to read starts a new thread.

R=ager@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//8574002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1533 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-15 13:19:07 +00:00
ager@google.com f789c40d85 Correct the sign of exit codes for the process library.
BUG=
TEST=

Review URL: http://codereview.chromium.org//8506013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1356 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-09 15:37:40 +00:00
sgjesse@google.com 7041797907 Get the OS error message for process exceptions on Windows
R=ager@google.com
Review URL: http://codereview.chromium.org//8277035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@435 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-14 13:03:39 +00:00
sgjesse@google.com 82312e0130 Use UUIDs for named pipe names on Windows instead of counter
R=ager@google.com
Review URL: http://codereview.chromium.org//8276002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@422 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-14 07:34:05 +00:00
sgjesse@google.com b98198c894 Make sure that the named pipe created for signalling the exit code is not inheritable
R=ager@google.com
Review URL: http://codereview.chromium.org//8267006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@396 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-13 13:34:36 +00:00
sgjesse@google.com d0496ec807 Implement the full process interface for Windows
There are still a couple of TODOs in the code.

R=ager@google.com
Review URL: http://codereview.chromium.org//8249007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@389 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-13 10:38:37 +00:00
sgjesse@google.com d5e6daf99f Fix Windows build
TBR=ager@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//8233008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@326 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-11 11:45:17 +00:00
dgrove@google.com 4c0f559d23 Initial checkin.
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-05 05:20:07 +00:00