File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -1546,8 +1546,7 @@ Interface.prototype.repl = function() {
15461546  var  listeners  =  this . repl . rli . listeners ( 'SIGINT' ) . slice ( 0 ) ; 
15471547  this . repl . rli . removeAllListeners ( 'SIGINT' ) ; 
15481548
1549-   // Exit debug repl on Ctrl + C 
1550-   this . repl . rli . once ( 'SIGINT' ,  function ( )  { 
1549+   function  exitDebugRepl ( )  { 
15511550    // Restore all listeners 
15521551    process . nextTick ( function ( )  { 
15531552      listeners . forEach ( function ( listener )  { 
@@ -1557,7 +1556,16 @@ Interface.prototype.repl = function() {
15571556
15581557    // Exit debug repl 
15591558    self . exitRepl ( ) ; 
1560-   } ) ; 
1559+ 
1560+     self . repl . rli . removeListener ( 'SIGINT' ,  exitDebugRepl ) ; 
1561+     self . repl . removeListener ( 'exit' ,  exitDebugRepl ) ; 
1562+   } 
1563+ 
1564+   // Exit debug repl on SIGINT 
1565+   this . repl . rli . on ( 'SIGINT' ,  exitDebugRepl ) ; 
1566+ 
1567+   // Exit debug repl on repl exit 
1568+   this . repl . on ( 'exit' ,  exitDebugRepl ) ; 
15611569
15621570  // Set new 
15631571  this . repl . eval  =  this . debugEval . bind ( this ) ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments