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: several properties undocumented on child process #27206

Closed
martinheidegger opened this issue Apr 13, 2019 · 1 comment
Closed

doc: several properties undocumented on child process #27206

martinheidegger opened this issue Apr 13, 2019 · 1 comment
Labels
child_process Issues and PRs related to the child_process subsystem. doc Issues and PRs related to the documentations.

Comments

@martinheidegger
Copy link

Tracking back as far as Node 0.12 it seems that the documentation for ChildProcess is missing several properties.

  • exitCode - if the process exited will contain the exit code, else null. Useful in combination with killedif (proc.exitCode !== null || proc.killed) to see if the process is still running.
  • signalCode - not sure what that is good for.
  • spawnfile & spawnargs the initial properties of the spawning. In combination with exec will show what shell is used. Useful for debugging.
@Trott Trott added doc Issues and PRs related to the documentations. child_process Issues and PRs related to the child_process subsystem. labels Apr 13, 2019
@sam-github
Copy link
Contributor

signalCode - not sure what that is good for.

Its probably the pair of exitCode -- if process terminated, it was either because it exited or it was signalled, in which case one or the other would be set. So, your example above would probably only work if the child was signalled from the node parent. If it was signalled from elsewhere (the shell?), or was signalled by the OS (segfault, SIGHUP), proc.killed would probably not be set.

HarshithaKP added a commit to HarshithaKP/node that referenced this issue Jan 13, 2020
@Trott Trott closed this as completed in 3299de8 Jan 16, 2020
codebytere pushed a commit that referenced this issue Feb 17, 2020
Add documentation for subprocess.exitCode, subprocess.signalCode,
subprocess.spawnargs, and subprocess.spawnfile.

PR-URL: #31342
Fixes: #27206
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
codebytere pushed a commit that referenced this issue Mar 14, 2020
Add documentation for subprocess.exitCode, subprocess.signalCode,
subprocess.spawnargs, and subprocess.spawnfile.

PR-URL: #31342
Fixes: #27206
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
codebytere pushed a commit that referenced this issue Mar 17, 2020
Add documentation for subprocess.exitCode, subprocess.signalCode,
subprocess.spawnargs, and subprocess.spawnfile.

PR-URL: #31342
Fixes: #27206
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
child_process Issues and PRs related to the child_process subsystem. doc Issues and PRs related to the documentations.
Projects
None yet
Development

No branches or pull requests

3 participants