Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
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 1988f5e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/unix/process.c
Expand Up @@ -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)) {
Expand Down

0 comments on commit 1988f5e

Please sign in to comment.