diff options
author | Nathan Rajlich <nathan@tootallnate.net> | 2012-03-13 11:53:49 -0700 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2012-03-13 19:58:53 +0100 |
commit | f9da776b332fbb1b7443da3446de9127b98b3d94 (patch) | |
tree | a3f2f3eac2fc5d256c54cb979c5f668e1f7bc3ed /src/node.js | |
parent | f214758dd1ef74b7f9746ec7a859a9dc73887aa3 (diff) | |
download | node-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.js | 3 |
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. |