save register cache on tick instead of sigint - fixes #1062

This commit is contained in:
Sebastian McKenzie 2015-03-23 17:26:08 +11:00
parent bc6d01d6fc
commit 5c41a33e41

View File

@ -13,14 +13,7 @@ export function load() {
if (process.env.BABEL_DISABLE_CACHE) return;
process.on("exit", save);
var sigint = function () {
process.removeListener("SIGINT", sigint);
save();
process.kill(process.pid, "SIGINT");
};
process.on("SIGINT", sigint);
process.nextTick(save);
if (!fs.existsSync(FILENAME)) return;