1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-15 03:48:02 -05:00
denoland-deno/cli/tests/unit_node/testdata/child_process_stdio_012.js

16 lines
414 B
JavaScript

import childProcess from "node:child_process";
import process from "node:process";
import * as path from "node:path";
import { fileURLToPath } from "node:url";
const script = path.join(
path.dirname(fileURLToPath(import.meta.url)),
"node_modules",
"foo",
"index.js",
);
const child = childProcess.spawn(process.execPath, [script], {
stdio: [0, 1, 2],
});
child.on("close", () => console.log("close"));