Advertisement
Guest User

Untitled

a guest
Jan 18th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. --- a/src/unix/process.c
  2. +++ b/src/unix/process.c
  3. @@ -241,10 +241,14 @@ static int uv__process_open_stream(uv_stdio_container_t* container,
  4. if (container->data.stream->type == UV_NAMED_PIPE &&
  5. ((uv_pipe_t*)container->data.stream)->ipc)
  6. flags = UV_STREAM_READABLE | UV_STREAM_WRITABLE;
  7. - else if (writable)
  8. - flags = UV_STREAM_WRITABLE;
  9. - else
  10. - flags = UV_STREAM_READABLE;
  11. + else {
  12. + flags = (writable ? UV_STREAM_WRITABLE : UV_STREAM_READABLE);
  13. + if (container->flags & UV_WRITABLE_PIPE)
  14. + flags |= UV_STREAM_WRITABLE;
  15. + if (container->flags & UV_STREAM_READABLE)
  16. + flags |= UV_STREAM_READABLE;
  17. + }
  18. +
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement