Closed
Description
- 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.)