From 8d603d540d568c54f078fdbac87ec77a80cad08e Mon Sep 17 00:00:00 2001 From: Livia Medeiros Date: Wed, 21 May 2025 21:59:25 +0900 Subject: [PATCH] child_process: give names to `ChildProcess` functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/58370 Reviewed-By: Colin Ihrig Reviewed-By: Juan José Arboleda Reviewed-By: Jordan Harband Reviewed-By: Jake Yuesong Li --- lib/internal/child_process.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/internal/child_process.js b/lib/internal/child_process.js index 748f14a283f..dada6b8cc5a 100644 --- a/lib/internal/child_process.js +++ b/lib/internal/child_process.js @@ -352,7 +352,7 @@ function closePendingHandle(target) { } -ChildProcess.prototype.spawn = function(options) { +ChildProcess.prototype.spawn = function spawn(options) { let i = 0; validateObject(options, 'options'); @@ -490,7 +490,7 @@ function onSpawnNT(self) { } -ChildProcess.prototype.kill = function(sig) { +ChildProcess.prototype.kill = function kill(sig) { const signal = sig === 0 ? sig : convertToValidSignal(sig === undefined ? 'SIGTERM' : sig); @@ -524,12 +524,12 @@ ChildProcess.prototype[SymbolDispose] = function() { }; -ChildProcess.prototype.ref = function() { +ChildProcess.prototype.ref = function ref() { if (this._handle) this._handle.ref(); }; -ChildProcess.prototype.unref = function() { +ChildProcess.prototype.unref = function unref() { if (this._handle) this._handle.unref(); };