aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/or/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 9ed1dd14e..759487c0a 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -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);