summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorrofl0r <rofl0r@users.noreply.github.com>2020-09-06 23:11:19 +0100
committerrofl0r <rofl0r@users.noreply.github.com>2020-09-06 23:11:22 +0100
commit8c86e8b3ae6ffcec693a06a4ea7d03274f3e5687 (patch)
tree55c93c4e6cff26189a0f2819f75565ebf4b21a5f
parent95b1a8ea063004d80bb36f4d1c856d4e22354ed3 (diff)
allow SIGUSR1 to be used as an alternative to SIGHUP
this allows a tinyproxy session in terminal foreground mode to reload its configuration without dropping active connections.
-rw-r--r--src/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 49b4d8f..da3feb3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -69,6 +69,7 @@ takesig (int sig)
int status;
switch (sig) {
+ case SIGUSR1:
case SIGHUP:
received_sighup = TRUE;
break;
@@ -388,6 +389,7 @@ main (int argc, char **argv)
setup_sig (SIGCHLD, takesig, "SIGCHLD", argv[0]);
setup_sig (SIGTERM, takesig, "SIGTERM", argv[0]);
if (daemonized) setup_sig (SIGHUP, takesig, "SIGHUP", argv[0]);
+ setup_sig (SIGUSR1, takesig, "SIGUSR1", argv[0]);
/* Start the main loop */
log_message (LOG_INFO, "Starting main loop. Accepting connections.");