Skip to content

Spawn-ed detached unref-ed child process in Windows still prevents parent from exit #5614

@vsemozhetbyt

Description

@vsemozhetbyt
  • Version: v5.7.1
  • Platform: Windows 7 64-bit
  • Subsystem: Child Process

If I understand the doc right, this script must not wait for child process exit before own exit:

const cp = require('child_process');
const prc = cp.spawn('notepad', [], {detached: true});
prc.unref();

However it does wait.

Metadata

Metadata

Assignees

No one assigned

    Labels

    child_processIssues and PRs related to the child_process subsystem.invalidIssues and PRs that are invalid.windowsIssues and PRs related to the Windows platform.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions