Skip to content

Commit

Permalink
child_process: document kill() return value
Browse files Browse the repository at this point in the history
This commit documents the return value from subprocess.kill().

PR-URL: #30669
Refs: #30668
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
cjihrig authored and MylesBorins committed Dec 17, 2019
1 parent 6b380cc commit f9f3ab2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion doc/api/child_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -1044,10 +1044,12 @@ added: v0.1.90
-->

* `signal` {number|string}
* Returns: {boolean}

The `subprocess.kill()` method sends a signal to the child process. If no
argument is given, the process will be sent the `'SIGTERM'` signal. See
signal(7) for a list of available signals.
signal(7) for a list of available signals. This function returns `true` if
kill(2) succeeds, and `false` otherwise.

```js
const { spawn } = require('child_process');
Expand Down

0 comments on commit f9f3ab2

Please sign in to comment.