From 562369f3489ff002ab8b9e73db5b5109c6f53354 Mon Sep 17 00:00:00 2001 From: atlowChemi Date: Thu, 14 Mar 2024 10:53:11 +0200 Subject: [PATCH] child_process: use internal addAbortListener PR-URL: https://github.com/nodejs/node/pull/52081 Refs: https://github.com/nodejs/node/pull/48596 Reviewed-By: Moshe Atlow Reviewed-By: Benjamin Gruenbaum Reviewed-By: Antoine du Hamel Reviewed-By: Luigi Pinca --- lib/child_process.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/child_process.js b/lib/child_process.js index 449013906e93e5..c09fca512584ce 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -785,7 +785,7 @@ function spawn(file, args, options) { if (signal.aborted) { process.nextTick(onAbortListener); } else { - addAbortListener ??= require('events').addAbortListener; + addAbortListener ??= require('internal/events/abort_listener').addAbortListener; const disposable = addAbortListener(signal, onAbortListener); child.once('exit', disposable[SymbolDispose]); }