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.
Fixesjoyent/node#3075.
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.
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.
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
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.
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.