Skip to content

doc: change type of child_process.signalCode to string

Rodrigo Muino Tomonari requested to merge github/fork/SimplyLinn/patch-1 into master

During testing, and interfacing with child_processes, I found that the child_proccess.signalCode property to be the string representation of the signal, not number.

Tested on node v14.6.0 (Windows) Tested on node v14.9.0 (Linux)

Sample code:

const child_process = require('child_process');
const cp = child_process.spawn('sleep', ['10']);
cp.kill();
setTimeout(() => console.log(cp.signalCode, typeof cp.signalCode), 100);
Checklist

Merge request reports

Loading