This fixes the issue that a mount point would be treated as a
symlink, but readlink would subsequently return an NT namespaced
path that is unusable for many purposes.
This also pre-emptively fixes the problems that would arise when
an user has a reparse point whose tag is neither
IO_REPARSE_TAG_MOUNT_POINT nor IO_REPARSE_TAG_SYMLINK.
Finally uv_lstat() will now return the correct length in st_size.
Previously the length was computed incorrectly for relative
symlinks, and those that had non-ascii characters in their target.
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.
Conflicts:
src/win/pipe.c
commit e53ab6675ba12d97ad6d93c9913a473ba5172617
Author: Bert Belder <bertbelder@gmail.com>
Date: Fri Mar 9 17:04:03 2012 +0100
Windows: report UV_ENOTSOCK when we opened a file instead of a pipe
Makes the pipe_connect_to_file test pass on Windows.
commit 8cbbfbe4c6489868470a7e410f80d4729f4091bf
Author: Igor Zinkovsky <igorzi@microsoft.com>
Date: Thu Mar 1 14:32:59 2012 -0800
test: make pipe_connect_to_file succeed with ECONNREFUSED
commit 6bbccf1fe0
Author: Igor Zinkovsky <igorzi@microsoft.com>
Date: Thu Mar 1 12:11:12 2012 -0800
windows: return UV_ENOTSOCK when doing uv_pipe_connect to a file
This patch changes how uv-win uses the UV_SHUTTING and UV_SHUT flags.
UV_SHUT is now only used for tcp handles to track whether shutdown() has
actually been called. UV_SHUTTING has the more generic meaning of
"no longer readable". It would be good to replace it by an actual
UV_READABLE flag in the future.
This makes the shutdown_close_tcp and shutdown_close_pipe tests pass on
windows.