diff options
author | cjihrig <cjihrig@gmail.com> | 2017-05-30 13:19:11 -0400 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2017-06-07 09:30:01 -0400 |
commit | edd541957f6bb6fa4ccb56bd1f878172f631ce36 (patch) | |
tree | 2a72ce78b05fc122c699d547152414f45d2cc16c /deps/uv/src/unix/pipe.c | |
parent | 12e39d6d943348a19da1bf84d4891aa28cd3ffb6 (diff) | |
download | android-node-v8-edd541957f6bb6fa4ccb56bd1f878172f631ce36.tar.gz android-node-v8-edd541957f6bb6fa4ccb56bd1f878172f631ce36.tar.bz2 android-node-v8-edd541957f6bb6fa4ccb56bd1f878172f631ce36.zip |
deps: upgrade libuv to 1.12.0
Fixes: https://github.com/nodejs/node/issues/12853
Fixes: https://github.com/nodejs/node/issues/854
PR-URL: https://github.com/nodejs/node/pull/13306
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'deps/uv/src/unix/pipe.c')
-rw-r--r-- | deps/uv/src/unix/pipe.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/deps/uv/src/unix/pipe.c b/deps/uv/src/unix/pipe.c index b73994cb8d..4a812955b0 100644 --- a/deps/uv/src/unix/pipe.c +++ b/deps/uv/src/unix/pipe.c @@ -47,7 +47,6 @@ int uv_pipe_bind(uv_pipe_t* handle, const char* name) { int err; pipe_fname = NULL; - sockfd = -1; /* Already bound? */ if (uv__stream_fd(handle) >= 0) @@ -76,7 +75,9 @@ int uv_pipe_bind(uv_pipe_t* handle, const char* name) { /* Convert ENOENT to EACCES for compatibility with Windows. */ if (err == -ENOENT) err = -EACCES; - goto err_bind; + + uv__close(sockfd); + goto err_socket; } /* Success. */ @@ -85,9 +86,6 @@ int uv_pipe_bind(uv_pipe_t* handle, const char* name) { handle->io_watcher.fd = sockfd; return 0; -err_bind: - uv__close(sockfd); - err_socket: uv__free((void*)pipe_fname); return err; @@ -183,6 +181,14 @@ void uv_pipe_connect(uv_connect_t* req, if (r == -1 && errno != EINPROGRESS) { err = -errno; +#if defined(__CYGWIN__) || defined(__MSYS__) + /* EBADF is supposed to mean that the socket fd is bad, but + Cygwin reports EBADF instead of ENOTSOCK when the file is + not a socket. We do not expect to see a bad fd here + (e.g. due to new_sock), so translate the error. */ + if (err == -EBADF) + err = -ENOTSOCK; +#endif goto out; } |