summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/internal/child_process.ts
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node/polyfills/internal/child_process.ts')
-rw-r--r--ext/node/polyfills/internal/child_process.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/node/polyfills/internal/child_process.ts b/ext/node/polyfills/internal/child_process.ts
index 365af4add..d4acf1db2 100644
--- a/ext/node/polyfills/internal/child_process.ts
+++ b/ext/node/polyfills/internal/child_process.ts
@@ -469,6 +469,13 @@ function normalizeStdioOption(
...Array<Stream | NodeStdio | number>,
] {
if (Array.isArray(stdio)) {
+ // `[0, 1, 2]` is equivalent to `"inherit"`
+ if (
+ stdio.length === 3 && stdio[0] === 0 && stdio[1] === 1 && stdio[2] === 2
+ ) {
+ return ["inherit", "inherit", "inherit"];
+ }
+
// At least 3 stdio must be created to match node
while (stdio.length < 3) {
ArrayPrototypePush(stdio, undefined);