TimothyFitz: process.on('SIGINT', function () { mylibrary.atexit(function () { process.exit(); }); });