From 95aa032413800a660c0afffb205114e808619722 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 to spawn and fork Add support for timeout to spawn and fork. Fixes: https://github.com/nodejs/node/issues/27639 PR-URL: https://github.com/nodejs/node/pull/37256 Reviewed-By: Benjamin Gruenbaum --- doc/api/child_process.md | 18 +++++-- lib/child_process.js | 29 +++++++++-- ...-child-process-fork-timeout-kill-signal.js | 50 +++++++++++++++++++ ...child-process-spawn-timeout-kill-signal.js | 50 +++++++++++++++++++ 4 files changed, 138 insertions(+), 9 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 677f3a5c190554..77467cc6573064 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -374,6 +374,9 @@ controller.abort();