summary refs log tree commit diff
path: root/bounce.c
diff options
context:
space:
mode:
Diffstat (limited to 'bounce.c')
-rw-r--r--bounce.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/bounce.c b/bounce.c
index b96326b..1015625 100644
--- a/bounce.c
+++ b/bounce.c
@@ -159,14 +159,20 @@ int main(int argc, char *argv[]) {
 
 	signal(SIGINT, signalHandler);
 	signal(SIGTERM, signalHandler);
+	signal(SIGUSR1, signalHandler);
 
 	size_t clients = 0;
 	for (;;) {
 		int nfds = poll(event.fds, event.len, -1);
 		if (nfds < 0 && errno != EINTR) err(EX_IOERR, "poll");
+
 		if (signals[SIGINT] || signals[SIGTERM]) break;
-		if (nfds < 0) continue;
+		if (signals[SIGUSR1]) {
+			listenConfig(certPath, privPath);
+			signals[SIGUSR1] = 0;
+		}
 
+		if (nfds < 0) continue;
 		for (size_t i = 0; i < event.len; ++i) {
 			short revents = event.fds[i].revents;
 			if (!revents) continue;