summaryrefslogtreecommitdiffstats
path: root/src/unix/pipe.c
diff options
context:
space:
mode:
authorlibuv upstream <libuv@googlegroups.com>2019-06-10 13:17:21 (GMT)
committerBrad King <brad.king@kitware.com>2019-06-18 11:45:34 (GMT)
commitb4069b04ff63b327ff4881282200c3c73fded34d (patch)
treef1c97b98e2253ec8e4a9b75ee2f8f99426e9b2f6 /src/unix/pipe.c
parent4fcb0d0213112bb2fdb04bb27e82543b93cfe41d (diff)
downloadCMake-b4069b04ff63b327ff4881282200c3c73fded34d.zip
CMake-b4069b04ff63b327ff4881282200c3c73fded34d.tar.gz
CMake-b4069b04ff63b327ff4881282200c3c73fded34d.tar.bz2
libuv 2019-06-10 (ee24ce90)
Code extracted from: https://github.com/libuv/libuv.git at commit ee24ce900e5714c950b248da2bdd311b01c983be (v1.x).
Diffstat (limited to 'src/unix/pipe.c')
-rw-r--r--src/unix/pipe.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/unix/pipe.c b/src/unix/pipe.c
index d3b554c..8347668 100644
--- a/src/unix/pipe.c
+++ b/src/unix/pipe.c
@@ -215,7 +215,7 @@ void uv_pipe_connect(uv_connect_t* req,
}
if (err == 0)
- uv__io_start(handle->loop, &handle->io_watcher, POLLIN | POLLOUT);
+ uv__io_start(handle->loop, &handle->io_watcher, POLLOUT);
out:
handle->delayed_error = err;
@@ -233,9 +233,6 @@ out:
}
-typedef int (*uv__peersockfunc)(int, struct sockaddr*, socklen_t*);
-
-
static int uv__pipe_getsockpeername(const uv_pipe_t* handle,
uv__peersockfunc func,
char* buffer,
@@ -246,10 +243,13 @@ static int uv__pipe_getsockpeername(const uv_pipe_t* handle,
addrlen = sizeof(sa);
memset(&sa, 0, addrlen);
- err = func(uv__stream_fd(handle), (struct sockaddr*) &sa, &addrlen);
+ err = uv__getsockpeername((const uv_handle_t*) handle,
+ func,
+ (struct sockaddr*) &sa,
+ (int*) &addrlen);
if (err < 0) {
*size = 0;
- return UV__ERR(errno);
+ return err;
}
#if defined(__linux__)