-
-
Notifications
You must be signed in to change notification settings - Fork 37.5k
child_process: add public API to unref ipc channel #9313
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 Node.js documentation.Issues and PRs related to Node.js documentation.feature requestIssues requesting new Node.js features.Issues requesting new Node.js features.
Description
Activity
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 Node.js documentation.Issues and PRs related to Node.js documentation.feature requestIssues requesting new Node.js features.Issues requesting new Node.js features.
It would be nice to have a public API to
unref()a child process's ipc channel. My use case for this is that I spawn a child process, send some messages back and forth via ipc, then at some point I want to detach the child process.child.unref()is not enough because that only unrefs the C++ ProcessWrap handle. Currently I have to resort to also doingchild._channel.unref(). I am not sure if this should be done automatically insidechild.unref()or if there should be a separate function or similar.