Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: document missing properties in child_process #31342

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions doc/api/child_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,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:
addaleax marked this conversation as resolved.
Show resolved Hide resolved

* {integer}

`subprocess.exitcode` property indicates exit code of the child process.
addaleax marked this conversation as resolved.
Show resolved Hide resolved
If child process is still running, the field will be null.
addaleax marked this conversation as resolved.
Show resolved Hide resolved

### `subprocess.kill([signal])`
<!-- YAML
added: v0.1.90
Expand Down Expand Up @@ -1368,6 +1375,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:
addaleax marked this conversation as resolved.
Show resolved Hide resolved

* {integer}

`subprocess.signalCode` property indicates the signal number received by
addaleax marked this conversation as resolved.
Show resolved Hide resolved
the child process if any, from the parent node prcess, else null.
addaleax marked this conversation as resolved.
Show resolved Hide resolved

###subprocess.spawnfie:
addaleax marked this conversation as resolved.
Show resolved Hide resolved

* {string}

`subprocess.spawnfile` property indicates the executable file name of
addaleax marked this conversation as resolved.
Show resolved Hide resolved
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.spawnargs:
addaleax marked this conversation as resolved.
Show resolved Hide resolved

* {Array}

`subprocess.spawnargs` property represents the full list of command line
addaleax marked this conversation as resolved.
Show resolved Hide resolved
arguments the child process was launched with.

### `subprocess.stderr`
<!-- YAML
added: v0.1.90
Expand Down