Skip to content

Commit

Permalink
bsd: support pipe2() on *BSD (libuv#4412)
Browse files Browse the repository at this point in the history
---------

Signed-off-by: Andy Pan <i@andypan.me>
  • Loading branch information
panjf2000 authored May 21, 2024
1 parent ab3ecf6 commit c8d4a87
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/unix/pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,11 @@ int uv_pipe_chmod(uv_pipe_t* handle, int mode) {
int uv_pipe(uv_os_fd_t fds[2], int read_flags, int write_flags) {
uv_os_fd_t temp[2];
int err;
#if defined(__FreeBSD__) || defined(__linux__)
#if defined(__linux__) || \
defined(__FreeBSD__) || \
defined(__OpenBSD__) || \
defined(__DragonFly__) || \
defined(__NetBSD__)
int flags = O_CLOEXEC;

if ((read_flags & UV_NONBLOCK_PIPE) && (write_flags & UV_NONBLOCK_PIPE))
Expand Down

0 comments on commit c8d4a87

Please sign in to comment.