Commit Graph

7 Commits

Author SHA1 Message Date
Antoine du Hamel
1fcb128771
test: do not assume process.execPath contains no spaces
We had a bunch of tests that would fail if run from an executable that
contains any char that should be escaped when run from a shell.

PR-URL: https://github.com/nodejs/node/pull/55028
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-09-22 13:03:30 +00:00
Debadree Chatterjee
2dc4290662
child_process: use signal.reason in child process abort
Fixes: https://github.com/nodejs/node/issues/47814
PR-URL: https://github.com/nodejs/node/pull/47817
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2023-05-08 08:17:03 +00:00
Richard Lau
2df72fe9de
test: avoid left behind child processes
Extend the Linux logic to all POSIX platforms in
test-child-process-exec-abortcontroller-promisified.

PR-URL: https://github.com/nodejs/node/pull/46276
Fixes: https://github.com/nodejs/build/issues/3154
Refs: https://github.com/nodejs/node/issues/37518
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Beth Griggs <bethanyngriggs@gmail.com>
Reviewed-By: Ruy Adorno <ruyadorno@google.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-01-22 11:25:28 +00:00
Wassim Chegham
eaadc4bd30 test: refactor code to use AbortSignal.abort()
PR-URL: https://github.com/nodejs/node/pull/37798
Refs: https://github.com/whatwg/dom/pull/960
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
2021-03-20 19:21:13 +01:00
Antoine du Hamel
4fde7dc580
test: fix flaky test-child-process-exec-abortcontroller-promisified
Fixes: https://github.com/nodejs/node/issues/37568

PR-URL: https://github.com/nodejs/node/pull/37572
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-03-05 09:51:38 -08:00
Nitzan Uziely
9f56bc8b4c child_process: fix spawn and fork abort behavior
Fix AbortSignal in Spawn which doesn't actually abort
the process, and fork can emit an AbortError even if
the process was already exited. Add documentation
For killSignal.

Fixes: https://github.com/nodejs/node/issues/37273

PR-URL: https://github.com/nodejs/node/pull/37325
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2021-02-27 14:38:50 +02:00
Carlos Fuentes
2242cbb253
child_process: allow promisified exec to be cancel
Using new AbortController, add support for promisified
exec to be cancelled.

PR-URL: https://github.com/nodejs/node/pull/34249
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-01-22 20:03:09 -08:00