Advertisement
Guest User

Untitled

a guest
Jan 18th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. diff --git a/src/unix/process.c b/src/unix/process.c
  2. index 9842710..15e988b 100644
  3. --- a/src/unix/process.c
  4. +++ b/src/unix/process.c
  5. @@ -238,13 +238,11 @@ static int uv__process_open_stream(uv_stdio_container_t* container,
  6. pipefds[1] = -1;
  7. uv__nonblock(pipefds[0], 1);
  8.  
  9. - if (container->data.stream->type == UV_NAMED_PIPE &&
  10. - ((uv_pipe_t*)container->data.stream)->ipc)
  11. - flags = UV_STREAM_READABLE | UV_STREAM_WRITABLE;
  12. - else if (writable)
  13. - flags = UV_STREAM_WRITABLE;
  14. - else
  15. - flags = UV_STREAM_READABLE;
  16. + flags = (writable ? UV_STREAM_WRITABLE : UV_STREAM_READABLE);
  17. + if (container->flags & UV_WRITABLE_PIPE)
  18. + flags |= UV_STREAM_WRITABLE;
  19. + if (container->flags & UV_READABLE_PIPE)
  20. + flags |= UV_STREAM_READABLE;
  21.  
  22. return uv__stream_open(container->data.stream, pipefds[0], flags);
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement