Commit Graph

47 Commits

Author SHA1 Message Date
Bert Belder
f0844ee760 win: add error mappings related to unsupported protocols 2013-01-30 19:09:55 +01:00
Bert Belder
d27d1e5078 win: sort error code mappings 2013-01-30 19:09:36 +01:00
Bert Belder
4c5c5d9aea windows: map ERROR_DIRECTORY to UV_ENOENT 2013-01-30 19:06:10 +01:00
Bert Belder
c7fca7ad84 windows: add some error code mappings 2012-12-04 14:05:50 +01:00
Ben Noordhuis
72955c29c2 windows: map WSAESHUTDOWN to UV_EPIPE
This is a back-port of commit 483043b from the master branch.
2012-11-14 01:06:03 +01:00
Bert Belder
f372fd4b13 windows: map ERROR_GEN_FAILURE to UV_EIO 2012-11-07 11:10:43 +01:00
Bert Belder
dfb6be0e07 windows: map WSANO_DATA to UV_ENOENT
This improves uv_getaddrinfo error reporting.
2012-08-03 17:37:22 +02:00
Bert Belder
4a88b3b4b7 windows: don't inhibit reparse behavior when non-symlink is encountered
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.
2012-06-28 05:07:18 +02:00
saghul
431d61af31 win: map ERROR_PRIVILEGE_NOT_HELD to UV_EPERM 2012-06-25 16:37:08 +02:00
Bert Belder
3da9504beb windows: map ERROR_INVALID_HANDLE to UV_EBADF 2012-06-22 20:04:07 +02: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
Ben Noordhuis
936795a2c8 windows: map ERROR_WRITE_PROTECT to UV_EROFS 2012-05-01 16:53:00 +02:00
Fedor Indutny
0efa3cf4d3 err: handle EIO errors on win/unix 2012-05-01 16:43:00 +02:00
Bert Belder
32f6f6e2c7 Windows: map ERROR_NOT_SAME_DEVICE to UV_EXDEV 2012-05-01 16:20:52 +02:00
Bert Belder
aea5db5da1 Windows: add mappings for UV_ENOENT 2012-04-27 21:24:27 +02:00
Bert Belder
cda7a28039 Windows: backport pipe-connect-to-file fixes from master
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
2012-04-05 16:47:49 +02:00
Bert Belder
163d8de392 Add UV_ENOSPC and mappings to it
Closes GH-337
2012-03-16 02:32:06 +01:00
Bert Belder
5d21056277 Windows: make sure that shutdown_cb is always called
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.
2012-03-09 16:31:16 +01:00
Bert Belder
1ac71a31e9 Map EBUSY and ENOTEMPTY errors 2012-03-07 21:26:37 +01:00
Bert Belder
86ebe48660 Windows: add error mappings that map to EPIPE 2012-02-16 23:58:14 +01:00
Bert Belder
bc8b99097a win: add ERROR_FILENAME_EXCED_RANGE mapping, fix fs_file_nametoolong test 2012-02-13 20:01:36 +01:00
Bert Belder
6c80bf34d3 Clean up error handling in win/fs.c, add some error mappings 2012-02-13 20:01:19 +01:00
Ben Noordhuis
c1cea705ba windows: map WSAETIMEDOUT to UV_ETIMEDOUT 2012-02-13 14:08:27 +01:00
Maciej Małecki
e2565c332a win: map ERROR_CANT_RESOLVE_FILENAME to UV_ENAMETOOLONG 2012-02-03 22:20:14 +01:00
Igor Zinkovsky
495853ee2b windows: map ERROR_ACCESS_DENIED to UV_EPERM 2012-02-01 12:38:14 -08:00
Bert Belder
6554954e3e Windows: add error mapping for WSAENOBUFS 2012-01-23 20:21:56 +01:00
Bert Belder
45b976abd9 Win: add mapping for ERROR_ACCESS_DENIED 2011-11-25 00:59:40 +01:00
Ryan Dahl
808bb8ed0b Shared uv_strerror 2011-11-09 18:06:49 -08:00
Ryan Dahl
fd2b04d784 Alternative errno strategy 2011-11-09 17:47:24 -08:00
Ryan Dahl
681bd290e6 UV_EACCESS -> UV_EACCES
In order to match existing Node API. See
https://github.com/joyent/node/pull/2001
2011-11-03 16:17:12 -07:00
Igor Zinkovsky
74b49e821b uv_kill 2011-11-02 14:34:07 -07:00
Ben Noordhuis
f2c6b4106d unix: have uv_strerror() handle getaddrinfo() errors 2011-10-28 01:31:55 +02:00
Ryan Dahl
2c7e8bb137 Map EAI_NONAME to ENOENT 2011-10-20 17:13:48 -07:00
Bert Belder
81c09cb2e3 win: add error mappings for ECONNRESET 2011-10-07 15:53:28 +02:00
Igor Zinkovsky
e7a53aed48 fix windows build 2011-09-28 11:52:08 -07:00
Erick Tryzelaar
23796d208c Fixes #76. Unify OS error reporting
As a nice fringe benefit, this also shaves a word
off of a windows TCP handle by replacing "uv_err_t
bind_error" with "int bind_error".
2011-09-27 19:05:33 -07:00
Igor Zinkovsky
58dd32750e windows: ERROR_PATH_NOT_FOUND -> UV_ENOENT mapping 2011-09-14 14:04:41 -07:00
isaacs
3c00d87b42 Add EEXIST handling
Additionally, map ERROR_ALREADY_EXISTS to EEXIST on Windows.  I'm a bit
unsure about this mapping.  Could a windows person confirm?
2011-09-12 16:36:35 -07:00
Bert Belder
e95a29ee18 Add mapping for ECONNABORTED 2011-09-09 05:23:07 +02:00
Igor Zinkovsky
cfa1423f96 fix fs_file_noent on windows 2011-09-08 18:23:19 -07:00
Bert Belder
12b01e95f9 Specialize uv_xxx_getsockname, add uv_tcp_getpeername 2011-09-04 04:49:13 +02:00
Bert Belder
78debf9f67 win: multiplicity 2011-08-31 04:19:16 +02:00
Bert Belder
5c9d749a57 win: udp support 2011-08-24 04:55:08 +02:00
Bert Belder
c6c3d15d81 Windows: slightly improve error reporting 2011-08-15 04:25:39 +02:00
Igor Zinkovsky
ee5236cf56 Windows: make uv_pipe_bind fail for the pipe name already in-use 2011-07-20 18:48:35 -07:00
Bert Belder
86f1ca90e5 Windows: implement uv_hrtime() 2011-07-19 15:01:12 +02:00
Bert Belder
3a91232f66 Split up uv-win.c 2011-07-19 03:47:30 +02:00