summaryrefslogtreecommitdiff
path: root/src/node.js
diff options
context:
space:
mode:
authorNathan Rajlich <nathan@tootallnate.net>2012-03-13 11:53:49 -0700
committerBert Belder <bertbelder@gmail.com>2012-03-13 19:58:53 +0100
commitf9da776b332fbb1b7443da3446de9127b98b3d94 (patch)
treea3f2f3eac2fc5d256c54cb979c5f668e1f7bc3ed /src/node.js
parentf214758dd1ef74b7f9746ec7a859a9dc73887aa3 (diff)
downloadnode-new-f9da776b332fbb1b7443da3446de9127b98b3d94.tar.gz
process: listen for the "exit" even on the main repl
Diffstat (limited to 'src/node.js')
-rw-r--r--src/node.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/node.js b/src/node.js
index 176526a07c..9dd9fd4195 100644
--- a/src/node.js
+++ b/src/node.js
@@ -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.