]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
clients exit immediately on interrupt; they don't wait
authorRoger Dingledine <arma@torproject.org>
Wed, 21 Jul 2004 03:15:32 +0000 (03:15 +0000)
committerRoger Dingledine <arma@torproject.org>
Wed, 21 Jul 2004 03:15:32 +0000 (03:15 +0000)
svn:r2076

src/or/main.c

index 9ed1dd14eff302279467c56199dd6e11230474b4..759487c0aebe877d66e3f6d9684dbc012182c8c1 100644 (file)
@@ -802,6 +802,10 @@ static int do_main_loop(void) {
     }
 #else /* do signal stuff only on unix */
     if(please_shutdown) {
+      if(!server_mode()) { /* do it now */
+        log(LOG_NOTICE,"Interrupt: exiting cleanly.");
+        exit(0);
+      }
       if(shutting_down) { /* we've already been asked. do it now. */
         log(LOG_NOTICE,"Second sigint received; exiting now.");
         exit(0);