From 9bd1044b98a709a9f7d5c27a99a84084f4bf5755 Mon Sep 17 00:00:00 2001 From: Alex Gresnel <31708810+agresnel@users.noreply.github.com> Date: Sat, 9 Sep 2017 11:44:55 -0700 Subject: [PATCH] child_process: set shell to false in fork() This commit ensures that spawn()'s shell option is unconditionally set to false when fork() is called. Refs: https://github.com/nodejs/node/pull/15299 Fixes: https://github.com/nodejs/node/issues/13983 PR-URL: https://github.com/nodejs/node/pull/15352 Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Richard Lau Reviewed-By: Colin Ihrig --- doc/api/child_process.md | 3 +++ lib/child_process.js | 1 + 2 files changed, 4 insertions(+) diff --git a/doc/api/child_process.md b/doc/api/child_process.md index f4a843fc09..a8bc0b38f7 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -356,6 +356,9 @@ output on this fd is expected to be line delimited JSON objects. *Note*: Unlike the fork(2) POSIX system call, `child_process.fork()` does not clone the current process. +*Note*: The `shell` option available in [`child_process.spawn()`][] is not +supported by `child_process.fork()` and will be ignored if set. + ### child_process.spawn(command[, args][, options])