Charlie McConnell
1d858156b4
unix: do not set environ unless one is provided
...
Currently, `uv_spawn` will set `environ` to the value of `options.env`, even if
`options.env` is `NULL`. This results in child processes for whom `environ ==
NULL`, which can cause a variety of unexpected issues.
2012-11-03 01:37:22 +01:00
Bert Belder
149b16f123
windows: closing handles should always keep the loop alive
...
This makes the tcp-ref2 and udp-ref2 tests pass again.
Also adds another reference count test.
2012-10-25 15:10:29 +02:00
Bert Belder
1e32cb01b5
unix: support signal handlers outside the main loop
2012-10-17 01:25:02 +02:00
Bert Belder
28eb619c65
windows: don't run signal tests
...
They are dummy tests on windows, running them is misleading.
Also remove duplicate 'test-signal.c' entry from uv.gyp.
2012-10-16 17:23:04 +02:00
Hiroaki Nakamura
acea3028c5
unix, windows: add thread barrier support
2012-10-09 17:30:52 +02:00
Shigeki Ohtsu
f7c991f1ce
test: add consumer-producer test for condvar
2012-10-07 23:17:31 +02:00
Hiroaki Nakamura
976c8a4387
Add support for condition variables on all platforms
2012-10-05 13:03:55 +02:00
Ben Noordhuis
1923abda94
test: add uv_fs_readlink test
2012-10-01 22:53:59 +02:00
Saúl Ibarra Corretgé
cc1c1912ca
unix, windows: add uv_tcp_open and uv_udp_open
2012-09-17 18:09:51 +02:00
Bert Belder
621a4e36f7
test: add test for uv_is_active and uv_is_closing
2012-08-27 23:57:48 +02:00
Ben Noordhuis
837edf4c0f
unix, windows: remove handle init counters
...
Remove the handle init counters, no one uses them.
2012-08-10 02:00:11 +02:00
Ben Noordhuis
ee50db6e36
unix, windows: preliminary signal handler support
...
* a no-op on Windows for now
* only supports the main loop on UNIX (again, for now)
2012-08-10 02:00:07 +02:00
Ben Noordhuis
13467a40d4
unix: retrieve execve() errors in process.c
...
Make the forked child process send the errno to its parent process when it
fails to spawn a new process.
2012-08-08 23:19:50 +02:00
Bert Belder
35c4858231
Remove c-ares tests and benchmarks
2012-08-07 01:03:51 +02:00
Ben Noordhuis
b5b8ead808
test: add failing fs_event test
...
Watches the same file twice. Fails on Linux with a segmentation fault.
2012-07-28 14:40:03 +02:00
Ben Noordhuis
1d1dd9bb7d
test: add 'unexpected read' tcp test
...
Regression test that verifies that the event loop doesn't busy loop when
the server sends a message and the client isn't reading.
2012-06-30 03:25:52 +02:00
Bert Belder
7628b6597e
test: fix test-gethostbyname to not use a DNS server on localhost
...
Because, you know, not everybody has one.
2012-06-29 05:44:20 +02:00
Ben Noordhuis
cc7c8542a5
unix, windows: add stat() based file watcher
...
Monitors a file path for changes. Supersedes ev_stat.
2012-05-31 20:32:24 +02:00
Iñaki Baz Castillo
b47af98e00
test: add tcp 'close on failed connect' test
...
Demonstrates temporary event loop stall with uv-unix. The issue is that pending
requests aren't processed until the next event (I/O, timeout, etc.) happens.
See #446 , #447 and #448 .
2012-06-07 00:06:24 +02:00
Ben Noordhuis
7d2ea31618
unix: fix event loop stall
...
Stop libev from entering the epoll_wait/kevent/port_getn/etc. syscall when
there are no active handles left, that will block indefinitely.
2012-06-04 23:36:50 +02:00
Ben Noordhuis
d08070435d
test: rename test tcp_dont_connect_after_write
...
Rename test tcp_dont_connect_after_write to tcp_connect_error_after_write,
teensy tad more descriptive.
2012-06-04 17:35:56 +02:00
Ben Noordhuis
b96ed68f46
test: add TCP connect error + write test
...
Original test contributed by Iñaki Baz Castillo. See #443 .
2012-06-04 15:58:32 +02:00
Ben Noordhuis
c76c2066c6
unix, windows: add semaphore functions
2012-06-03 04:04:05 +02:00
Fedor Indutny
1cd9642cbb
test: stdin/out/err should be set to /dev/null when ignored
2012-06-02 21:38:39 +02:00
Bert Belder
9759c20e90
test: verify that closing an active poll handle doesn't hang
2012-06-01 18:39:47 +02:00
Fedor Indutny
dc7a62d114
test: test for uv_spawn with stdio_count == 3
2012-06-01 17:32:34 +02:00
Charlie McConnell
69a923bf93
process: implement UV_PROCESS_DETACHED flag for uv_spawn
2012-06-01 02:24:05 +02:00
Ben Noordhuis
171ad8567d
unix, windows: add uv_walk()
...
Lets the libuv user iterate over the open handles. Mostly intended as a
debugging tool or a post-hoc cleanup mechanism.
2012-05-30 02:33:39 +02:00
Igor Zinkovsky
5a34f19970
windows: allow specifying FDs to be inherited by a child process
...
Previously the only option was to create a pipe or an ipc channel. This
patch makes it possible to inherit a handle that is already open in the
parent process. There is also room for setting more than just stdin,
stdout and stderr, although this is not supported yet.
2012-05-28 23:59:58 +02:00
Ben Noordhuis
028fef84b8
unix: update timer if already active
...
uv_timer_start() no longer returns an error when the timer is already active,
now it just updates the timer. Consistent with the uv-win implementation.
Fixes #425 .
2012-05-26 02:09:59 +02:00
Ben Noordhuis
28766dcf55
test: remove test-eio-overflow.c
...
Unreliable, it's timing / system load sensitive.
2012-05-25 01:33:44 +02:00
Ben Noordhuis
7c8313bd0f
unix, windows: make uv_run_once() return a bool
...
The return value of uv_run_once() now signals if it needs to be called again.
Fixes #427 .
2012-05-23 20:49:03 +02:00
Bert Belder
0ef7844b87
Disable test-callback-order
...
It's not correct.
2012-05-22 17:13:04 +02:00
Ben Noordhuis
a478847f74
test: add callback order test
...
Ensure that idle callbacks run before other callbacks.
2012-05-22 16:04:11 +02:00
Ben Noordhuis
7447048981
test: enable tcp_connect_error_fault test
2012-05-18 01:19:57 +02:00
Ben Noordhuis
538a562cdb
test: add tcp connect timeout test
2012-05-18 01:19:56 +02:00
Igor Zinkovsky
60af28abab
windows: support junctions with uv_fs_synlink
...
based on @piscisaureus implementation
2012-05-17 09:53:26 -07:00
Ben Noordhuis
9efa8b3571
unix, windows: rework reference counting scheme
...
This commit changes how the event loop determines if it needs to stay alive.
Previously, an internal counter was increased whenever a handle got created
and decreased again when the handle was closed.
While conceptually simple, it turned out hard to work with: you often want
to keep the event loop alive only if the handle is actually doing something.
Stopped or inactive handles were a frequent source of hanging event loops.
That's why this commit changes the reference counting scheme to a model where
a handle only references the event loop when it's active. 'Active' means
different things for different handle types, e.g.:
* timers: ticking
* sockets: reading, writing or listening
* processes: always active (for now, subject to change)
* idle, check, prepare: only active when started
This commit also changes how the uv_ref() and uv_unref() functions work: they
now operate on the level of individual handles, not the whole event loop.
The Windows implementation was done by Bert Belder.
2012-05-17 07:07:53 +02:00
Bert Belder
beaf750700
Test: add tests for uv_poll
2012-05-03 15:52:57 +02:00
Bert Belder
bfd6d465c7
Test for the uv_spawn's setuid and setgid options
2012-04-28 02:39:18 +02:00
Bert Belder
4f0ff3c504
Disable ipc_send_recv_pipe test on Windows
...
It's not supported yet
2012-04-12 03:33:53 +02:00
Igor Zinkovsky
70925c3bb9
windows: Enable passing of TCP connections over IPC
2012-03-29 18:18:46 -07:00
Bert Belder
6e0ca3aa8f
Merge branch 'v0.6'
...
Conflicts:
src/unix/linux/inotify.c
2012-03-27 23:46:23 +02:00
Bert Belder
aff078390f
Test: verify that uv_close from an fs event callback works properly
2012-03-27 23:00:26 +02:00
Bert Belder
732cf91d6d
Test: verify that no callbacks are made after closing an fs event watcher
2012-03-27 23:00:26 +02:00
Ben Noordhuis
e190162975
test: test cross-process handle send/recv
2012-03-09 09:12:53 -08:00
Bert Belder
e99fba47c8
Merge remote-tracking branch 'origin/v0.6'
...
Conflicts:
src/win/pipe.c
test/run-tests.c
2012-03-09 16:41:12 +01:00
Bert Belder
422a898a7f
Tests: verify that shutdown_cb is always called
2012-03-09 05:00:11 +01:00
Bert Belder
fb65d74c84
Tests: verify that uv_write and uv_shutdown ref the event loop
2012-03-09 05:00:11 +01:00
Brandon Philips
d07f2466d0
test: fs: add tests for read EOF
...
This fix was merged without tests:
https://github.com/philips/libuv/tree/fix-read-on-windows-to-handle-eof
So take tests from igorzi:
46024bf33d
2012-03-07 14:33:33 +01:00