Skip to content

detached child_process doesn't inherit stdio #3596

@yepitschunked

Description

@yepitschunked

The following snippet of code prints the child process' output if detached is true, and doesn't if it's false:

  cmd = '...'
  child_process.spawn(cmd, [], {
    stdio: 'inherit',
    detached: true
  });

This part of the docs seems relevant:

If the parent's stdio is inherited, the child will remain attached to the controlling terminal.

Which seems to imply that inheriting these streams is supported. Not sure if this is just me misreading the docs or...

Metadata

Metadata

Assignees

No one assigned

    Labels

    child_processIssues and PRs related to the child_process subsystem.macosIssues and PRs related to the macOS platform / OSX.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions