You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The underlying implementation in `node/lib/internal/child_process.js` does
return a boolean value, but this value is devoid of any semantic content.
Shortened it does:
```
if childProcessHandle {
res = child.kill(signal)
if (res === 0) {
child.killed = true;
return true;
else {
throwError()
}
}
else {
return false;
}
```
which means the returned boolean depends on whether the subprocess still exists
and whether the signal was successfully sent (apparently the original author
thought that sending a signal will always kill the process).
The return value isn’t even mentioned in the documentation, so it must be a
historical artifact kept around for backward compatibility.
0 commit comments