diff options
author | libuv upstream <libuv@googlegroups.com> | 2022-07-12 16:16:33 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-09-27 13:49:38 (GMT) |
commit | a23da1559648995998343f3ae63076db736b55a5 (patch) | |
tree | f16d7ac9fb0a52f8d57b3828bc5179aa75b7cb53 /src/unix/pipe.c | |
parent | 09ec116d91c571dff0f108c23eabbcccdca767fa (diff) | |
download | CMake-a23da1559648995998343f3ae63076db736b55a5.zip CMake-a23da1559648995998343f3ae63076db736b55a5.tar.gz CMake-a23da1559648995998343f3ae63076db736b55a5.tar.bz2 |
libuv 2022-07-12 (0c1fa696)
Code extracted from:
https://github.com/libuv/libuv.git
at commit 0c1fa696aa502eb749c2c4735005f41ba00a27b8 (v1.44.2).
Diffstat (limited to 'src/unix/pipe.c')
-rw-r--r-- | src/unix/pipe.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/unix/pipe.c b/src/unix/pipe.c index 788e038..e8cfa14 100644 --- a/src/unix/pipe.c +++ b/src/unix/pipe.c @@ -51,7 +51,9 @@ int uv_pipe_bind(uv_pipe_t* handle, const char* name) { /* Already bound? */ if (uv__stream_fd(handle) >= 0) return UV_EINVAL; - + if (uv__is_closing(handle)) { + return UV_EINVAL; + } /* Make a copy of the file name, it outlives this function's scope. */ pipe_fname = uv__strdup(name); if (pipe_fname == NULL) @@ -91,7 +93,7 @@ err_socket: } -int uv_pipe_listen(uv_pipe_t* handle, int backlog, uv_connection_cb cb) { +int uv__pipe_listen(uv_pipe_t* handle, int backlog, uv_connection_cb cb) { if (uv__stream_fd(handle) == -1) return UV_EINVAL; @@ -319,7 +321,7 @@ uv_handle_type uv_pipe_pending_type(uv_pipe_t* handle) { if (handle->accepted_fd == -1) return UV_UNKNOWN_HANDLE; else - return uv__handle_type(handle->accepted_fd); + return uv_guess_handle(handle->accepted_fd); } |