process: listen for the "exit" even on the main repl

This commit is contained in:
Nathan Rajlich 2012-03-13 11:53:49 -07:00 committed by Bert Belder
parent f214758dd1
commit f9da776b33

View File

@ -100,6 +100,9 @@
if (NativeModule.require('tty').isatty(0)) {
// REPL
var repl = Module.requireRepl().start('> ', null, null, true);
repl.on('exit', function() {
process.exit();
});
} else {
// Read all of stdin - execute it.