fix: create IPC channel for spawned babel-node process (#12836)
This commit is contained in:
parent
5b99b8f221
commit
74dc70aabb
@ -81,7 +81,7 @@ getV8Flags(function (err, v8Flags) {
|
||||
|
||||
const child_process = require("child_process");
|
||||
const proc = child_process.spawn(process.argv[0], args, {
|
||||
stdio: "inherit",
|
||||
stdio: ["inherit", "inherit", "inherit", "ipc"],
|
||||
});
|
||||
proc.on("exit", function (code, signal) {
|
||||
process.on("exit", function () {
|
||||
|
||||
2
packages/babel-node/test/fixtures/babel-node/subprocess-send/in-files/payload.js
vendored
Normal file
2
packages/babel-node/test/fixtures/babel-node/subprocess-send/in-files/payload.js
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
process.send({ hello: "world" });
|
||||
console.log("sent");
|
||||
4
packages/babel-node/test/fixtures/babel-node/subprocess-send/options.json
vendored
Normal file
4
packages/babel-node/test/fixtures/babel-node/subprocess-send/options.json
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"args": ["payload.js"],
|
||||
"stdout": "sent"
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user