UNPKG

on-exit

Version:

Register tasks to perform when the process exits.

10 lines (7 loc) 195 B
var onExit = require('../'); onExit.logger(function(msg) { process.send(msg); }); setTimeout(function() { throw new Error('This process should be killed before the timeout fires'); }, 1500);