Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

unix: put child process stdio fds in blocking mode

Remove the O_NONBLOCK flag from file descriptors 0-2, most applications don't
expect EAGAIN errors when dealing with stdio.
  • Loading branch information
bnoordhuis committed Sep 11, 2012
1 parent b5028c5 commit 1988f5e581e4cadb20d8e69ddee9be8a26ff2646
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/unix/process.c
@@ -240,6 +240,9 @@ static void uv__process_child_init(uv_process_options_t options,
} else {
uv__cloexec(use_fd, 0);
}

if (fd <= 2)
uv__nonblock(fd, 0);
}

if (options.cwd && chdir(options.cwd)) {

0 comments on commit 1988f5e

Please sign in to comment.
You can’t perform that action at this time.