diff --git a/src/unix/process.c b/src/unix/process.c index 18d056e9e50..d212bc9bdbe 100644 --- a/src/unix/process.c +++ b/src/unix/process.c @@ -316,7 +316,7 @@ static void uv__process_child_init(const uv_process_options_t* options, for (fd = 0; fd < stdio_count; fd++) { use_fd = pipes[fd][1]; - if (use_fd >= 0 && fd != use_fd) + if (use_fd >= stdio_count) close(use_fd); }