From 1b045d464d5703b97d7fbd5b434454fc60b96915 Mon Sep 17 00:00:00 2001 From: Xu Meng Date: Mon, 20 Jan 2020 01:26:27 -0600 Subject: [PATCH] ibmi: ensure that pipe backlog is not zero On IBMi PASE, listen(pipe_fd, backlog=0) leads to "Connection refused" error PR-URL: https://github.com/libuv/libuv/pull/2641 Reviewed-By: Richard Lau Reviewed-By: Colin Ihrig Reviewed-By: Ben Noordhuis --- src/unix/pipe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/unix/pipe.c b/src/unix/pipe.c index cdf24fa9..78ce1542 100644 --- a/src/unix/pipe.c +++ b/src/unix/pipe.c @@ -95,8 +95,9 @@ 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 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)