summaryrefslogtreecommitdiff
path: root/opentracker.c
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2026-10-29 00:53:50 +0100
committerDirk Engling <erdgeist@erdgeist.org>2026-10-29 00:53:50 +0100
commit0f95c7d1056cab5bd8c6334cf601349ac4631457 (patch)
treec7c27709ef3695659ab4b743d7ae359d4ece272b /opentracker.c
parent2812a6795149f68226e940212c511b7c625c81d5 (diff)
Revert last wake-up experiment. Having each udp worker wake up once a second to check if the tracker stops is wasteful
Diffstat (limited to 'opentracker.c')
-rw-r--r--opentracker.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/opentracker.c b/opentracker.c
index ab4a934..e0f16d7 100644
--- a/opentracker.c
+++ b/opentracker.c
@@ -49,7 +49,9 @@ static void panic(const char *routine) {
49 exit(111); 49 exit(111);
50} 50}
51 51
52/* Say we are stopping, wake the loop, and let main do the work on its own stack. */ 52/* Say we are stopping, wake the loop, and let main do the work on its own
53 stack. Everything other than SIGINT falls through and does nothing, which
54 is what OT_SIGNAL_WAKE wants: returning from the read is all it is for. */
53static void signal_handler(int s) { 55static void signal_handler(int s) {
54 if (s == SIGINT) { 56 if (s == SIGINT) {
55 const char byte = 0; 57 const char byte = 0;
@@ -85,7 +87,8 @@ static void install_signal_handlers(void) {
85 sa.sa_handler = signal_handler; 87 sa.sa_handler = signal_handler;
86 sigemptyset(&sa.sa_mask); 88 sigemptyset(&sa.sa_mask);
87 sa.sa_flags = 0; 89 sa.sa_flags = 0;
88 if ((sigaction(SIGINT, &sa, NULL) == -1) || (sigaction(SIGALRM, &sa, NULL) == -1)) 90 if ((sigaction(SIGINT, &sa, NULL) == -1) || (sigaction(SIGALRM, &sa, NULL) == -1) ||
91 (sigaction(OT_SIGNAL_WAKE, &sa, NULL) == -1))
89 panic("install_signal_handlers"); 92 panic("install_signal_handlers");
90 93
91 sigaddset(&signal_mask, SIGINT); 94 sigaddset(&signal_mask, SIGINT);