child_process: give names to ChildProcess functions

PR-URL: https://github.com/nodejs/node/pull/58370
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
This commit is contained in:
Livia Medeiros 2025-05-21 21:59:25 +09:00 committed by GitHub
parent 0e72f3b715
commit 8d603d540d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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();
};