process: listen for the "exit" even on the main repl
This commit is contained in:
parent
f214758dd1
commit
f9da776b33
@ -100,6 +100,9 @@
|
|||||||
if (NativeModule.require('tty').isatty(0)) {
|
if (NativeModule.require('tty').isatty(0)) {
|
||||||
// REPL
|
// REPL
|
||||||
var repl = Module.requireRepl().start('> ', null, null, true);
|
var repl = Module.requireRepl().start('> ', null, null, true);
|
||||||
|
repl.on('exit', function() {
|
||||||
|
process.exit();
|
||||||
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Read all of stdin - execute it.
|
// Read all of stdin - execute it.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user