summaryrefslogtreecommitdiffstats
path: root/src/unix/pipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/unix/pipe.c')
-rw-r--r--src/unix/pipe.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/unix/pipe.c b/src/unix/pipe.c
index 8347668..040d578 100644
--- a/src/unix/pipe.c
+++ b/src/unix/pipe.c
@@ -95,8 +95,12 @@ int uv_pipe_listen(uv_pipe_t* handle, int backlog, uv_connection_cb cb) {
if (uv__stream_fd(handle) == -1)
return UV_EINVAL;
-#if defined(__MVS__)
+ if (handle->ipc)
+ return UV_EINVAL;
+
+#if defined(__MVS__) || defined(__PASE__)
/* On zOS, backlog=0 has undefined behaviour */
+ /* On IBMi PASE, backlog=0 leads to "Connection refused" error */
if (backlog == 0)
backlog = 1;
else if (backlog < 0)
@@ -261,7 +265,7 @@ static int uv__pipe_getsockpeername(const uv_pipe_t* handle,
addrlen = strlen(sa.sun_path);
- if (addrlen >= *size) {
+ if ((size_t)addrlen >= *size) {
*size = addrlen + 1;
return UV_ENOBUFS;
}