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

Commit 1988f5e

Browse files
committed
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.
1 parent b5028c5 commit 1988f5e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/unix/process.c

+3
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,9 @@ static void uv__process_child_init(uv_process_options_t options,
240240
} else {
241241
uv__cloexec(use_fd, 0);
242242
}
243+
244+
if (fd <= 2)
245+
uv__nonblock(fd, 0);
243246
}
244247

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

0 commit comments

Comments
 (0)