aboutsummaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorJohn Brooks <john.brooks@dereferenced.net>2010-11-14 14:33:55 -0800
committerNick Mathewson <nickm@torproject.org>2010-11-19 15:49:54 -0500
commit7441999738e7c1b0ea94a39dd6e1f8a48043ff7d (patch)
tree7dc6314277e4f9cd412de4946663a3e259c56bca /src/or/main.c
parent4f66bf4fe7ec4c52ba97a81c40cf824a8ccb6cbb (diff)
downloadtor-7441999738e7c1b0ea94a39dd6e1f8a48043ff7d.tar.gz
tor-7441999738e7c1b0ea94a39dd6e1f8a48043ff7d.zip
Add a SIGNAL event for control connections
Implements ticket #1955
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 1e01ad14d5..823290aa2d 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -1840,11 +1840,13 @@ signal_callback(int fd, short events, void *arg)
case SIGUSR1:
/* prefer to log it at INFO, but make sure we always see it */
dumpstats(get_min_log_level()<LOG_INFO ? get_min_log_level() : LOG_INFO);
+ control_event_signal(sig);
break;
case SIGUSR2:
switch_logs_debug();
log_debug(LD_GENERAL,"Caught USR2, going to loglevel debug. "
"Send HUP to change back.");
+ control_event_signal(sig);
break;
case SIGHUP:
if (do_hup() < 0) {
@@ -1852,6 +1854,7 @@ signal_callback(int fd, short events, void *arg)
tor_cleanup();
exit(1);
}
+ control_event_signal(sig);
break;
#ifdef SIGCHLD
case SIGCHLD:
@@ -1868,11 +1871,13 @@ signal_callback(int fd, short events, void *arg)
(int)(MAX_SIGNEWNYM_RATE+time_of_last_signewnym-now));
} else {
signewnym_impl(now);
+ control_event_signal(sig);
}
break;
}
case SIGCLEARDNSCACHE:
addressmap_clear_transient();
+ control_event_signal(sig);
break;
}
}