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.
This commit is contained in:
Ben Noordhuis 2012-09-12 01:44:46 +02:00
parent b5028c5b54
commit 1988f5e581

View File

@ -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)) {