mirror of
https://github.com/nodejs/node.git
synced 2025-05-06 09:02:40 +00:00

In addition to removing unused vars, this also fixes an instance where booleans were set presumably to check something but then never used. This now confirms that the events that were setting the booleans are fired. PR-URL: https://github.com/nodejs/node/pull/4425 Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
25 lines
533 B
JavaScript
25 lines
533 B
JavaScript
'use strict';
|
|
require('../common');
|
|
var fork = require('child_process').fork;
|
|
|
|
if (process.argv[2] === 'child') {
|
|
console.log('child -> call disconnect');
|
|
process.disconnect();
|
|
|
|
setTimeout(function() {
|
|
console.log('child -> will this keep it alive?');
|
|
process.on('message', function() { });
|
|
}, 400);
|
|
|
|
} else {
|
|
var child = fork(__filename, ['child']);
|
|
|
|
child.on('disconnect', function() {
|
|
console.log('parent -> disconnect');
|
|
});
|
|
|
|
child.once('exit', function() {
|
|
console.log('parent -> exit');
|
|
});
|
|
}
|