UNPKG
on-exit
Version:
latest (1.0.1)
1.0.1
1.0.0
Register tasks to perform when the process exits.
github.com/Prestaul/on-exit
on-exit
/
tests
/
child-with-logger-continuous.js
10 lines
(7 loc)
•
195 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
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
);