1 var common = require('../common');
2 var assert = require('assert');
3 var fork = require('child_process').fork;
5 if (process.argv[2] === 'child') {
6 console.log('child -> call disconnect');
9 setTimeout(function() {
10 console.log('child -> will this keep it alive?');
11 process.on('message', function () { });
15 var child = fork(__filename, ['child']);
17 child.on('disconnect', function () {
18 console.log('parent -> disconnect');
21 child.once('exit', function () {
22 console.log('parent -> exit');