[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [arm/release] fix: wasn't shutting down daemons after interrupt



commit 796b9c0feb9e325177d1b4e42c1e07c3ee748283
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Fri Jul 1 08:51:37 2011 -0700

    fix: wasn't shutting down daemons after interrupt
    
    Moving the shutdown of service daemons into finally block so it's done after
    keyboard interrupts (ie, ctrl+c). Otherwise shutting down this way could cause
    occasional stacktraces.
---
 src/cli/controller.py |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/cli/controller.py b/src/cli/controller.py
index e771a26..c9ab6e7 100644
--- a/src/cli/controller.py
+++ b/src/cli/controller.py
@@ -503,6 +503,7 @@ def startTorMonitor(startTime):
     curses.wrapper(drawTorMonitor, startTime)
   except KeyboardInterrupt:
     pass # skip printing stack trace in case of keyboard interrupt
+  finally: shutdownDaemons()
 
 def drawTorMonitor(stdscr, startTime):
   """
@@ -602,6 +603,4 @@ def drawTorMonitor(stdscr, startTime):
       for panelImpl in displayPanels:
         isKeystrokeConsumed = panelImpl.handleKey(key)
         if isKeystrokeConsumed: break
-  
-  shutdownDaemons()
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits