node/test/fixtures/parent-process-nonpersistent.js

14 lines
279 B
JavaScript
Raw Permalink Normal View History

const spawn = require('child_process').spawn,
path = require('path'),
childPath = path.join(__dirname, 'child-process-persistent.js');
var child = spawn(process.execPath, [ childPath ], {
detached: true,
stdio: 'ignore'
});
console.log(child.pid);
child.unref();