debugger: double ctrl+break on win should exit node
authorFedor Indutny <fedor.indutny@gmail.com>
Tue, 27 Sep 2011 17:37:37 +0000 (00:37 +0700)
committerRyan Dahl <ry@tinyclouds.org>
Tue, 27 Sep 2011 21:31:30 +0000 (14:31 -0700)
Fixes #1780.

src/node.cc

index 4933c0c..32df682 100644 (file)
@@ -2384,9 +2384,12 @@ static bool EnableDebugSignalHandler(DWORD signal) {
   if (!debugger_running) {
     fprintf(stderr, "Hit Ctrl+Break - starting debugger agent.\n");
     EnableDebug(false);
+    return true;
+  } else {
+    // Run default system action (terminate)
+    return false;
   }
 
-  return true;
 }
 #endif