Skip to content

child_process: special handling of process.on('message') #13913

@refack

Description

@refack
  • Version: *
  • Platform: *
  • Subsystem: child_process
process.on('message');

has a special meaning in the context of IPC between parent and child. The problem is a 'message' event could be triggered other code, or listened to outside of IPC context, so we can not do any special treatment for it.
I suggest adding 'IPCMessage' that only the IPC channel can trigger, and registering a listener to would fail if an IPC channel was not established.
Ref: nodejs/help#693 (comment)
[edit]
The intention is to emit both events: message for backwards compatibility, and IPCMessage for a validated IPC only events.

Metadata

Metadata

Assignees

No one assigned

    Labels

    child_processIssues and PRs related to the child_process subsystem.feature requestIssues that request new features to be added to Node.js.processIssues and PRs related to the process subsystem.

    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