Skip to content

Commit e968865

Browse files
committed
doc: document missing properties in child_process
fixes:nodejs#27206
1 parent 9530362 commit e968865

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

doc/api/child_process.md

+35
Original file line numberDiff line numberDiff line change
@@ -1075,6 +1075,13 @@ When the child process is a Node.js instance (e.g. spawned using
10751075
[`child_process.fork()`][]), the `process.disconnect()` method can be invoked
10761076
within the child process to close the IPC channel as well.
10771077

1078+
###subprocess.exitCode:
1079+
1080+
* {integer}
1081+
1082+
`subprocess.exitcode` property indicates exit code of the child process.
1083+
If child process is still running, the field will be null.
1084+
10781085
### `subprocess.kill([signal])`
10791086
<!-- YAML
10801087
added: v0.1.90
@@ -1368,6 +1375,34 @@ It is also recommended that any `'message'` handlers in the child process
13681375
verify that `socket` exists, as the connection may have been closed during the
13691376
time it takes to send the connection to the child.
13701377

1378+
###subprocess.signalCode:
1379+
1380+
* {integer}
1381+
1382+
`subprocess.signalCode` property indicates the signal number received by
1383+
the child process if any, from the parent node prcess, else null.
1384+
1385+
###subprocess.spawnfie:
1386+
1387+
* {string}
1388+
1389+
`subprocess.spawnfile` property indicates the executable file name of
1390+
the child process that is launched.
1391+
1392+
For [`child_process.fork()`][], its value will be equal to
1393+
[`process.execPath`][].
1394+
For [`child_process.spawn()`][], its value will be the name of
1395+
the executable file.
1396+
For [`child_process.exec()`][], its value will be the name of the shell
1397+
in which the child process is launched.
1398+
1399+
###subprocess.spawnargs:
1400+
1401+
* {Array}
1402+
1403+
`subprocess.spawnargs` property represents the full list of command line
1404+
arguments the child process was launched with.
1405+
13711406
### `subprocess.stderr`
13721407
<!-- YAML
13731408
added: v0.1.90

0 commit comments

Comments
 (0)