Skip to content

node:child_process — fork() + IPC (send/disconnect/'message'/channel) unimplemented #1933

Closed

Description

@proggeramlug

Summary

child_process.fork(modulePath[, args][, options]) is not implemented. fork spawns a child running a Node module with an IPC channel wired up, exposing child.send(msg), child.on("message", …), child.disconnect(), and the connected/channel state.

This is the largest remaining piece of #1780. It depends on real async subprocess execution + an IPC channel (see the async-reactor issue), which Perry does not have today — every child currently runs synchronously to completion, so there is no live process to exchange messages with.

What to do

  • Implement fork() returning a ChildProcess with a working IPC channel.
  • child.send(message[, sendHandle][, options][, callback]) serializes message (JSON / advanced serialization) to the child.
  • child.on("message", (msg) => …) fires when the child calls process.send(...).
  • child.disconnect() closes the channel; connected flips to false, channel to null.
  • The child side needs process.send / process.on("message") / process.connected / process.disconnect().

Note: in compiled-Perry there is no node to fork into — fork of a .ts/.js module path implies either re-spawning the compiled Perry binary with an entry selector, or compiling the forked module too. Scope the child-launch strategy as part of this ticket.

Parent: #1780. perry 0.5.1029.

Activity

  1. added
    enhancementNew capability or improvement
    parityCompatibility gap with Node.js, ECMAScript, or the supported ecosystem
    on May 27, 2026
  2. proggeramlug commented on May 27, 2026

    @proggeramlug
    ContributorAuthor

    Resolved by #1955 (merged to main as a309836) — implemented and verified byte-for-byte against node --experimental-strip-types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew capability or improvementparityCompatibility gap with Node.js, ECMAScript, or the supported ecosystem

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions