Commit Graph

30 Commits

Author SHA1 Message Date
Bert Belder
d60d94e0c3 Unix: implement uv_poll 2012-05-03 15:52:56 +02:00
Bert Belder
99a995a6b8 uv_spawn: support setting the child process' user and group id 2012-04-28 02:38:41 +02:00
Ben Noordhuis
3c415975d9 unix: don't conditionally compile kqueue fs watcher
Always compile in the kqueue-based fs event watcher and handle it at run-time
if the kernel doesn't actually support it.

Works around build issues when -mmacosx-version-min is not set properly.

Fixes joyent/node#3075.
2012-04-10 23:22:32 +02:00
Bert Belder
5f38ba1a89 Move private req and handle fields to platform headers
And fix other problems introduced with UV_HANDLE_TYPE_MAP and UV_REQ_TYPE_MAP.
2012-04-05 01:28:24 +02:00
Ben Noordhuis
ed395e0619 unix: replace handle->next_watcher
Remove the next_watcher and replace it with a linked list. Said list is named
endgame_handles (because the uv-win calls it that) and contains all the handles
that are in the UV_CLOSING state.

The goal of this commit is two-fold:

a) remove a dependency on libev, and
b) share more code with uv-win in the future

A nice side effect is that it shaves a few bytes off a uv_handle_t.
2012-04-04 05:22:20 -07:00
Ben Noordhuis
8895c9e672 unix: use uv_timer_t for c-ares' timeout timer 2012-04-03 03:23:57 +02:00
Ben Noordhuis
42095c85a0 Remove UV_ARES_TASK_PRIVATE_FIELDS.
It's only used internally, it doesn't have to be part of a public header file.
2012-04-03 02:44:50 +02:00
Ben Noordhuis
ef47a627ad unix: move libeio specific fields to uv-unix.h 2012-03-21 02:11:18 +01:00
Ben Noordhuis
d3efefb043 linux: share inotify fd across event loop
Previously, a new inotify fd was created for each watcher, making it quite easy
to run into the system-wide fs.inotify.max_user_instances limit (usually 128).

Fixes #300.
2012-02-23 09:21:30 -08:00
Ben Noordhuis
c5aa86bd39 Remove uv_import() and uv_export().
Not needed anymore now that support for isolates has been removed from Node.

This commit reverts the following commits:

  812e410 test: fix up stream import/export test
  e34dc13 unix: implement uv_import() and uv_export()
  d1a0e8e test: fix undefined macro error
  2ce0058 import/export streams accross loops
2012-02-12 15:49:54 +01:00
Ben Noordhuis
e34dc13496 unix: implement uv_import() and uv_export() 2012-01-30 21:44:47 +01:00
Igor Zinkovsky
2ce0058251 import/export streams accross loops 2012-01-30 21:44:27 +01:00
Ben Noordhuis
85f6b7952b Fix Windows build, uv_eio_channel is Unix only. 2011-12-28 14:42:46 +01:00
Ben Noordhuis
69ce0145f6 Wrap platform "thread-safe run once" APIs. 2011-12-20 20:34:55 +01:00
Ben Noordhuis
8e4ed88bbe Wrap platform thread APIs. 2011-11-21 21:04:16 +01:00
Ben Noordhuis
1fc1f28093 Wrap platform mutex and rwlock APIs.
Read/write locks are emulated with critical sections on Windows XP and Vista
because those platforms don't have a (complete) native read/write lock API.
2011-11-18 12:42:08 +01:00
Ben Noordhuis
224584c53e sunos: check that event ports supports fs watching 2011-11-10 20:04:55 +01:00
Bert Belder
90e15f1110 Implement uv_dlopen and friends 2011-10-29 00:52:34 +02:00
Ben Noordhuis
3e4af533ae sunos: implement file watcher API 2011-10-26 03:49:34 +00:00
Ryan Dahl
5656e3c8bd Prepare for writable TTY to be blocking 2011-10-10 13:25:46 -07:00
Ryan Dahl
bb6b629e6a make test-ipc accept the pending tcp server 2011-10-06 10:17:18 -07:00
Ben Noordhuis
8e9a3384c9 unix: implement kqueue file watcher API
kqueue fds are not embeddable into other pollsets (select, poll, kqueue).
Hack the libev event loop to receive kqueue events with filter flags intact.
2011-10-04 23:28:36 +02:00
Ryan Dahl
153d3c7c57 unix: allow tty raw mode to be turned off 2011-09-30 11:21:51 -07:00
Igor Zinkovsky
a1f98d55b1 fix c-ares on windows 2011-09-27 16:09:57 -07:00
Ben Noordhuis
3368d6c1a2 unix: stub file watcher implementation
The file watcher API has not been implemented on all Unices yet.
Provide stubs on those platforms so libuv at least compiles.
2011-09-22 23:55:05 +02:00
Ben Noordhuis
2a1c32a60c linux: implement file watcher API 2011-09-21 13:23:49 -07:00
Ben Noordhuis
bca49960fb unix: handle stream write errors properly
1. Ensure that failed writes don't leave the write queue in an inconsistent
   state. Before, write requests were handed back to the user but were not
   removed from the write queue. The cause of at least one use-after-free bug.

2. Pass the error to the callback on the next iteration of the event loop
   instead of returning it immediately.
2011-09-14 04:16:45 +02:00
Ryan Dahl
4484d61fe1 Add interfaces for uv_pipe_open, uv_tty_init, uv_tty_set_mode
Nothing works - no tests. This is just to coordinate efforts between Bert
and I.
2011-09-12 14:32:14 -07:00
Ben Noordhuis
52eca75152 unix: uv_pipe_t should not depend on UV_TCP_PRIVATE_FIELDS 2011-09-10 01:39:46 +02:00
Ryan Dahl
b47c474cfd Move private headers into include/uv-private 2011-08-31 00:43:55 -07:00