-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
Incorrect documentation for child_process #22297
Copy link
Copy link
Closed
Labels
child_processIssues and PRs related to the child_process subsystem.Issues and PRs related to the child_process subsystem.docIssues and PRs related to the documentations.Issues and PRs related to the documentations.questionIssues that look for answers.Issues that look for answers.
Metadata
Metadata
Assignees
Labels
child_processIssues and PRs related to the child_process subsystem.Issues and PRs related to the child_process subsystem.docIssues and PRs related to the documentations.Issues and PRs related to the documentations.questionIssues that look for answers.Issues that look for answers.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I recently put in a PR over on DefinitelyTyped based on the
child_processdocs, and another user pointed out that the documented options are missing a legal value. The stdio section of the child_process docs lists"inherit"as a valid (shorthand) string argument, but it does not appear in the numbered list under the array argument description.At first, I thought "inherit" and
null/undefinedwere equivalent, but then I dug around in the relevant code and it behaves differently from any other value. Under the hood, the transformed object (havingtype = "inherit") is passed through to the native implementation as is, and I'm not sure where to find the source for that (in v8, I guess?), so the trail sort of went cold for me. If anybody can explain what "inherit" (in an array value, not as shorthand) actually does, I can put in the PR, or you could just file the PR directly.