ajohnsen@google.com
6906b3ba5f
Fix listening for multiple signals.
...
BUG=https://code.google.com/p/dart/issues/detail?id=18793
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//285023002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36153 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-14 09:36:03 +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
ajohnsen@google.com
ca58691974
Mark pipe as close-on-exec.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//251403004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35354 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-24 07:34:07 +00:00
ajohnsen@google.com
0c157cd31e
Move signal_blocker to platform and use it by default in TEMP_FAILURE_RETRY.
...
BUG=http://code.google.com/p/dart/issues/detail?id=16927
R=johnmccutchan@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//165723007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33745 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-17 13:51:11 +00:00
ajohnsen@google.com
36ba03fd0c
Use signal-block around fork() to avoid we block it.
...
This issue is seen on a single-core VM.
BUG=https://code.google.com/p/dart/issues/detail?id=17217
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//176933006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33219 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-03 15:38:22 +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
ajohnsen@google.com
3bc42be527
Block other signals while handling a signal.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//118713003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31331 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-20 12:12:17 +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
1cd800214f
Always wait for child processes when forked, even if the process failed.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//23494048
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27384 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-11 14:29:23 +00:00
ajohnsen@google.com
6949a7bd08
Simplify process exit-code handling on Posix, take 2.
...
As in https://codereview.chromium.org/24024007 , except the monitor->Wait
is now called in a loop with a guard, to ensure we actually do get notified.
Also, now correctly exiting the thread if we have no more child
processes, using the initialize/terminate mutex as guard.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//23717038
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27380 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-11 13:05:13 +00:00
ajohnsen@google.com
bce63cccc9
Revert "Simplify process exit-code handling on Posix."
...
This reverts commit f1b1ba410e964b0f787513f245faf8b457c9331a.
BUG=
Review URL: https://codereview.chromium.org//23536032
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27251 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-06 15:02:31 +00:00
ajohnsen@google.com
5e4135c731
Simplify process exit-code handling on Posix.
...
We now only use waitpid and not signals. When we exit, we perform a
small fork-and-exit to interrupt waitpid, so it can exit the thread.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//24024007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27247 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-06 13:08:34 +00:00
sgjesse@google.com
f235a79d0d
Remove ASSERT which was reported as a race by ThreadSanitizer
...
R=whesse@google.com
BUG=
Review URL: https://codereview.chromium.org//23903007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27131 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-04 13:52:59 +00:00
whesse@google.com
6de4e020f2
Fix android compilation by copying process_linux.cc to process_android.cc.
...
These files, in runtime/bin, are the native functions supporting the dart:io
Process class. The android version hadn't been updated when the linux version was changed.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//23428002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26642 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 12:28:08 +00:00
cbracken@google.com
a6ace331f3
Replaced strerror() calls with threadsafe strerror_r().
...
Mac/Android use the XSI-compliant definition of strerror_r() which stores the message in the passed-in buffer.
Linux uses the GNU-specific definition of strerror_r() which takes a buffer and returns the message in a char* (which may or may not be the passed-in buffer).
BUG=
R=iposva@google.com
Review URL: https://codereview.chromium.org//22634003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25943 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-08 20:24:05 +00:00
ajohnsen@google.com
900dba8e03
Remove static mutexes/monitors from dart:io.
...
BUG=
R=whesse@google.com
Review URL: https://codereview.chromium.org//18080010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24576 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-28 08:44:15 +00:00
kustermann@google.com
ba62bae621
Fix for leaking file descriptor issue
...
When calling a non-existent executable, a pair of file descriptors will be
created with pipe(). One end goes to the exitcode handler thread, the other end
goes to the epoll() thread.
If an error occurs during process creation, the pipe is still created and the
exit handler thread writes the exitcode to the pipe, but the other file
descriptor is not added to the epoll() set and is therefore leaked. (i.e.
Process_Start ignores the other end of the pipe if exec() failed in
Proces::Start()).
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//15980006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23534 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-03 09:41:36 +00:00
smok@google.com
ebbc2020a2
Put everything in runtime/bin into '::dart::bin' namespace.
...
Review URL: https://codereview.chromium.org//14341015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22032 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-25 14:22:30 +00:00
kustermann@google.com
2eb595367c
Fix of file descriptor inheritance problem in process_{linux,android,mac}
...
BUG=http://dartbug.com/9030
Review URL: https://codereview.chromium.org//12576007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19790 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-11 13:35:38 +00:00
iposva@google.com
9046a44a37
Prepare for removal of source_filter.gypi:
...
- Guard OS-dependent source files with #if TARGET_OS_* in a similar
fashion to the architecture dependent sources.
Review URL: https://codereview.chromium.org//12282051
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18786 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-20 21:17:38 +00:00
kustermann@google.com
c20c523de8
Set close-on-exec flag on pipe() and epoll() file descriptors
...
Review URL: https://codereview.chromium.org//11644017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16308 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-19 09:36:47 +00:00
ager@google.com
8a14c1c319
Use FormatMessageW for Windows error messages to handle internationalized messages correctly.
...
R=sgjesse@google.com
BUG=dartbug.com/6986
Review URL: https://codereview.chromium.org//11558012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16041 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-12 14:39:21 +00:00
gram@google.com
3601944836
Revised CL for customisable logging (replacing printfs).
...
Review URL: https://codereview.chromium.org//11312242
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15096 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 17:38:15 +00:00
jackpal@google.com
e060b66a3e
Add _android files for building DartVM on Android
...
Split directory_posix -> directory_(android|linux|macos)
This allows us to cleanly make Android-specific changes to
directory_android.cc
Copy all _linux files to _android files and edit as needed to account
for the differences between Linux and Android:
+ getcwd(0, NULL) doesn't work on Android, have to emulate
+ Android doesn't have a '/tmp' directory, have to emulate
+ Android doesn't provide mkdtemp(), have to emulate.
+ Small differences in the available system include files.
+ Use pthread_cond_timedwait_monotonic instead of
pthread_condattr_setclock
Review URL: https://chromiumcodereview.appspot.com//10826233
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10613 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-13 23:06:52 +00:00