test: avoid orphaned child on Windows abort test

Fixes: https://github.com/nodejs/node/issues/58118
Signed-off-by: PickBas <sayed.kirill@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65451
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
This commit is contained in:
Kirill Saied authored and GitHub committed 2026-08-31 14:48:19 +00:00
1 parent 9f1e44cfef
commit e68a93a8e9
1 file changed
+3 -4
@@ -10,10 +10,9 @@ const invalidArgTypeError = {
name: 'TypeError'
};
const waitCommand = common.isWindows ?
// `"` is forbidden for Windows paths, no need for escaping.
`"${process.execPath}" -e "setInterval(()=>{}, 99)"` :
'sleep 2m';
// `pause` is a cmd.exe builtin, so killing the shell kills the whole tree.
// Running an executable here would leave it orphaned.
const waitCommand = common.isWindows ? 'pause' : 'sleep 2m';
{
const ac = new AbortController();