Remove excessive copyright/license boilerplate
[platform/upstream/nodejs.git] / test / parallel / test-child-process-fork-ref2.js
1 var common = require('../common');
2 var assert = require('assert');
3 var fork = require('child_process').fork;
4
5 if (process.argv[2] === 'child') {
6   console.log('child -> call disconnect');
7   process.disconnect();
8
9   setTimeout(function() {
10     console.log('child -> will this keep it alive?');
11     process.on('message', function () { });
12   }, 400);
13
14 } else {
15   var child = fork(__filename, ['child']);
16
17   child.on('disconnect', function () {
18     console.log('parent -> disconnect');
19   });
20
21   child.once('exit', function () {
22     console.log('parent -> exit');
23   });
24 }