summaryrefslogtreecommitdiff
path: root/tests/registry/npm/@denotest/child-process-fork/1.0.0/index.js
blob: ca0ba246a74e25e7d18432b220c5c0b91c0da955 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
const path = require("path");
const childProcess = require("node:child_process");

function childProcessFork(path) {
  const child = childProcess.fork(path);
  child.on("exit", () => {
    console.log("Done.");
  });
}

module.exports = {
  run() {
    childProcessFork(path.join(__dirname, "forked_path.js"));
  }
};