fix: create IPC channel for spawned babel-node process (#12836)

This commit is contained in:
Huáng Jùnliàng 2021-02-21 13:31:36 -05:00 committed by GitHub
parent 5b99b8f221
commit 74dc70aabb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

View File

@ -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 () {

View File

@ -0,0 +1,2 @@
process.send({ hello: "world" });
console.log("sent");

View File

@ -0,0 +1,4 @@
{
"args": ["payload.js"],
"stdout": "sent"
}