Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/unix/process.c b/src/unix/process.c
- index 9842710..15e988b 100644
- --- a/src/unix/process.c
- +++ b/src/unix/process.c
- @@ -238,13 +238,11 @@ static int uv__process_open_stream(uv_stdio_container_t* container,
- pipefds[1] = -1;
- uv__nonblock(pipefds[0], 1);
- - if (container->data.stream->type == UV_NAMED_PIPE &&
- - ((uv_pipe_t*)container->data.stream)->ipc)
- - flags = UV_STREAM_READABLE | UV_STREAM_WRITABLE;
- - else if (writable)
- - flags = UV_STREAM_WRITABLE;
- - else
- - flags = UV_STREAM_READABLE;
- + flags = (writable ? UV_STREAM_WRITABLE : UV_STREAM_READABLE);
- + if (container->flags & UV_WRITABLE_PIPE)
- + flags |= UV_STREAM_WRITABLE;
- + if (container->flags & UV_READABLE_PIPE)
- + flags |= UV_STREAM_READABLE;
- return uv__stream_open(container->data.stream, pipefds[0], flags);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement