diff options
author | Andy Pan <i@andypan.me> | 2025-04-07 15:03:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-07 09:03:26 +0200 |
commit | 745c68d4ea5ecbf420056e7dfa7ab9bd43cb2f07 (patch) | |
tree | 1670a6aef3434d94f017b48f24380faa4542778d /src | |
parent | c1a9f01f226133e3b8539ce678871fe1c0a68270 (diff) | |
download | libuv-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.c | 4 |
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)) |