exit-hook.js
function handleExit (canCancel, signal, code) {
	var i = 0,
		sub;

	while ((sub = subs[i++])) {
		if (sub[0].call(sub[1], canCancel, signal, code) === false && canCancel) {
			return;
		}
	}

	if (canCancel) {
		process.exit(code);
	}
}
function handleExit (canCancel, signal, code) {
	var i = 0,
		sub;

	while ((sub = subs[i++])) {
		if (sub[0].call(sub[1], canCancel, signal, code) === false && canCancel) {
			return;
		}
	}

	if (canCancel) {
		process.exit(code);
	}
}
function handleExit ( canCancel , signal , code ) { var i = 0 , sub ; while ( ( sub = subs [ i ++ ] ) ) { if ( sub [ 0 ] . call ( sub [ 1 ] , canCancel , signal , code ) === false && canCancel ) { return ; } } if ( canCancel ) { process . exit ( code ) ; } }
Handler for all exit events
Handler for all exit events