aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndy Pan <i@andypan.me>2025-04-07 15:03:26 +0800
committerGitHub <noreply@github.com>2025-04-07 09:03:26 +0200
commit745c68d4ea5ecbf420056e7dfa7ab9bd43cb2f07 (patch)
tree1670a6aef3434d94f017b48f24380faa4542778d /src
parentc1a9f01f226133e3b8539ce678871fe1c0a68270 (diff)
downloadlibuv-745c68d4ea5ecbf420056e7dfa7ab9bd43cb2f07.tar.gz
libuv-745c68d4ea5ecbf420056e7dfa7ab9bd43cb2f07.zip
sunos: use pipe2 on solaris and illumos (#4747)
Solaris implemented pipe2 in 11.4 and illumos have had it since 2013. Ref: https://docs.oracle.com/cd/E88353_01/html/E37841/pipe2-2.html https://illumos.org/man/2/pipe2 https://www.illumos.org/issues/3714
Diffstat (limited to 'src')
-rw-r--r--src/unix/pipe.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/unix/pipe.c b/src/unix/pipe.c
index 6bfe6cf2..9512c20c 100644
--- a/src/unix/pipe.c
+++ b/src/unix/pipe.c
@@ -496,7 +496,9 @@ int uv_pipe(uv_os_fd_t fds[2], int read_flags, int write_flags) {
defined(__FreeBSD__) || \
defined(__OpenBSD__) || \
defined(__DragonFly__) || \
- defined(__NetBSD__)
+ defined(__NetBSD__) || \
+ defined(__illumos__) || \
+ (defined(UV__SOLARIS_11_4) && UV__SOLARIS_11_4)
int flags = O_CLOEXEC;
if ((read_flags & UV_NONBLOCK_PIPE) && (write_flags & UV_NONBLOCK_PIPE))