From 8d4592920fe2cf38e90d4f459821783a7a10b05c Mon Sep 17 00:00:00 2001 From: Nitzan Uziely Date: Sun, 7 Feb 2021 01:39:54 +0200 Subject: [PATCH] child_process: add timeout and killSignal to spawn and fork Add support for timeout and killSignal to spawn and fork. Fixes: https://github.com/nodejs/node/issues/27639 --- doc/api/child_process.md | 14 ++++ lib/child_process.js | 42 ++++++++++- .../test-child-process-fork-abort-signal.js | 17 ++++- ...-child-process-fork-timeout-kill-signal.js | 69 ++++++++++++++++++ .../test-child-process-spawn-controller.js | 46 ++++++++++++ ...child-process-spawn-timeout-kill-signal.js | 70 +++++++++++++++++++ 6 files changed, 256 insertions(+), 2 deletions(-) create mode 100644 test/parallel/test-child-process-fork-timeout-kill-signal.js create mode 100644 test/parallel/test-child-process-spawn-timeout-kill-signal.js diff --git a/doc/api/child_process.md b/doc/api/child_process.md index 87a62ddbbc864e..054b0d11504a1b 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -351,6 +351,9 @@ controller.abort();