summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2026-11-05 16:05:29 +0100
committerDirk Engling <erdgeist@erdgeist.org>2026-11-05 16:05:29 +0100
commitee765f1469ecb4ac666139340928f35b39926f36 (patch)
treef526e584f9c814e991dd4645c6adb31dec3f93a1 /src
parentab538c872d1e1f79feecaa0f85d0ff62216e78e4 (diff)
Install signal handlers before the first thread is spawned
Diffstat (limited to 'src')
-rw-r--r--src/opentracker.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/opentracker.c b/src/opentracker.c
index 8de3fc1..f0841ff 100644
--- a/src/opentracker.c
+++ b/src/opentracker.c
@@ -410,6 +410,10 @@ int main(int argc, char **argv) {
410 if (event_add(g_self_pipe[0], EVENT_IN, fdstate_open(g_self_pipe[0], (void *)FLAG_SELFPIPE, 0)) == -1) 410 if (event_add(g_self_pipe[0], EVENT_IN, fdstate_open(g_self_pipe[0], (void *)FLAG_SELFPIPE, 0)) == -1)
411 panic("selfpipe event_add"); 411 panic("selfpipe event_add");
412 412
413 /* Before any thread exists, so none of them runs with a signal still at its
414 default disposition */
415 install_signal_handlers();
416
413 /* Init all sub systems. This call may fail with an exit() */ 417 /* Init all sub systems. This call may fail with an exit() */
414 trackerlogic_init(); 418 trackerlogic_init();
415 419
@@ -422,8 +426,6 @@ int main(int argc, char **argv) {
422 if (g_statefile) 426 if (g_statefile)
423 load_state(g_statefile); 427 load_state(g_statefile);
424 428
425 install_signal_handlers();
426
427 listen_start_tcp_workers(); 429 listen_start_tcp_workers();
428 listen_start_udp_workers(); 430 listen_start_udp_workers();
429 431