mirror of
https://github.com/nodejs/node.git
synced 2024-11-29 23:16:30 +01:00
14 lines
277 B
JavaScript
14 lines
277 B
JavaScript
|
|
||
|
var 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();
|