Skip to content

Incorrect documentation for child_process #22297

@thw0rted

Description

@thw0rted
  • Version: all
  • Platform: all
  • Subsystem: child_process

I recently put in a PR over on DefinitelyTyped based on the child_process docs, 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/undefined were equivalent, but then I dug around in the relevant code and it behaves differently from any other value. Under the hood, the transformed object (having type = "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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    child_processIssues and PRs related to the child_process subsystem.docIssues and PRs related to the documentations.questionIssues that look for answers.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions