mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
doc: document missing properties in child_process
Add documentation for subprocess.exitCode, subprocess.signalCode, subprocess.spawnargs, and subprocess.spawnfile. PR-URL: https://github.com/nodejs/node/pull/31342 Fixes: https://github.com/nodejs/node/issues/27206 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
1 parent
de6d5523a1
commit
b4d15a9adc
1 file changed
+35
@@ -1055,6 +1055,13 @@ When the child process is a Node.js instance (e.g. spawned using
|
||||
[`child_process.fork()`][]), the `process.disconnect()` method can be invoked
|
||||
within the child process to close the IPC channel as well.
|
||||
|
||||
### `subprocess.exitCode`
|
||||
|
||||
* {integer}
|
||||
|
||||
The `subprocess.exitcode` property indicates the exit code of the child process.
|
||||
If the child process is still running, the field will be null.
|
||||
|
||||
### `subprocess.kill([signal])`
|
||||
<!-- YAML
|
||||
added: v0.1.90
|
||||
@@ -1348,6 +1355,34 @@ It is also recommended that any `'message'` handlers in the child process
|
||||
verify that `socket` exists, as the connection may have been closed during the
|
||||
time it takes to send the connection to the child.
|
||||
|
||||
### `subprocess.signalCode`
|
||||
|
||||
* {integer}
|
||||
|
||||
The `subprocess.signalCode` property indicates the signal number received by
|
||||
the child process if any, else null.
|
||||
|
||||
### `subprocess.spawnargs`
|
||||
|
||||
* {Array}
|
||||
|
||||
The `subprocess.spawnargs` property represents the full list of command line
|
||||
arguments the child process was launched with.
|
||||
|
||||
### `subprocess.spawnfile`
|
||||
|
||||
* {string}
|
||||
|
||||
The `subprocess.spawnfile` property indicates the executable file name of
|
||||
the child process that is launched.
|
||||
|
||||
For [`child_process.fork()`][], its value will be equal to
|
||||
[`process.execPath`][].
|
||||
For [`child_process.spawn()`][], its value will be the name of
|
||||
the executable file.
|
||||
For [`child_process.exec()`][], its value will be the name of the shell
|
||||
in which the child process is launched.
|
||||
|
||||
### `subprocess.stderr`
|
||||
<!-- YAML
|
||||
added: v0.1.90
|
||||
|
||||
Reference in new issue
Block a user