Skip to content

IPC direct writing fails on Windows #17405

Closed
@elibarzilay

Description

@elibarzilay
  • Version: 9.2.0
  • Platform: Windows
  • Subsystem: child_process

Using a fie descriptor directly to send IPC messages is broken on
Windows:

  • x.js:

    require("child_process").spawn("node", ["y.js"],
                                   {stdio: ["ignore", "pipe" , "pipe", "ipc"]})
      .on("message", m => console.log("got a message:", m));
  • y.js:

    require('fs').createWriteStream(null, {fd: 3})
      .write(`{"m": "Test"}\n`, "utf8");

On Linux, this works fine, but on Windows I'm getting:

Assertion failed: avail >= sizeof(ipc_frame.header), file src\win\pipe.c, line 1593

If I change y.js to use process.send it works fine again. (There's
no reason to avoid it, but we want to get IPC messages from a python
subprocess, which fails in the same way.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    child_processIssues and PRs related to the child_process subsystem.docIssues and PRs related to the documentations.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions