fork.js 238 B

123456
  1. const path = require('path');
  2. const childProcess = require('child_process');
  3. const crashPath = path.join(__dirname, 'node-crash.js');
  4. const child = childProcess.fork(crashPath, { silent: true });
  5. child.on('exit', () => process.exit(0));