electron/spec/fixtures/module/fork_ping.js
Samuel Attard 122685194a
build: add import/order eslint rule (#44085)
* build: add import/order eslint rule

* chore: run lint:js --fix
2024-10-02 19:10:44 -07:00

18 lines
426 B
JavaScript

const childProcess = require('node:child_process');
const path = require('node:path');
process.on('uncaughtException', function (error) {
process.send(error.stack);
});
const child = childProcess.fork(path.join(__dirname, '/ping.js'));
process.on('message', function (msg) {
child.send(msg);
});
child.on('message', function (msg) {
process.send(msg);
});
child.on('exit', function (code) {
process.exit(code);
});