/
githubmirror
/
deno
Обзор
Документация
Войти
/
githubmirror
/
deno
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tests/specs/compile/node_child_process_fork/main.js
12 строк
441 B
Bartek Iwańczuk
fix(compile): run forked child's module instead of entrypoint (#34687)
11 июн 2026, 04:08
Не верифицирован
11 июн 2026, 04:08
5b71a56
Код
Авторство
О чём код?
import { fork } from "node:child_process"; // Regression test for https://github.com/denoland/deno/issues/26304 // In a compiled binary, fork() must run the embedded `child.js` module rather // than re-running this entrypoint. The child echoes a message back over IPC. const child = fork("./child.js"); child.on("message", (msg) => { console.log("parent got:", msg.reply); child.kill(); Deno.exit(0); }); child.send({ ask: "ping" });