From 3e6a7e179b51b16903213f586ee893d51166139e 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 b3484de5762890..c984004f94b6d2 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -304,6 +304,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])