]> git.ipfire.org Git - thirdparty/opentracker.git/commitdiff
Install default signal handlers before spawning first thread
authorDirk Engling <erdgeist@erdgeist.org>
Mon, 15 Apr 2024 21:08:16 +0000 (23:08 +0200)
committerDirk Engling <erdgeist@erdgeist.org>
Mon, 15 Apr 2024 21:08:16 +0000 (23:08 +0200)
opentracker.c

index 01cb5012a1f6fda6c74baedf4c82dee55eacd91c..497b48d9f0cbf9264289ac4e9d5507e8875b71b2 100644 (file)
@@ -761,6 +761,8 @@ int main(int argc, char **argv) {
     ot_try_bind(serverip, 6969, FLAG_UDP);
   }
 
+  defaul_signal_handlers();
+
 #ifdef WANT_SYSLOGS
   openlog("opentracker", 0, LOG_USER);
   setlogmask(LOG_UPTO(LOG_INFO));
@@ -783,7 +785,6 @@ int main(int argc, char **argv) {
   io_setcookie(g_self_pipe[0], (void *)FLAG_SELFPIPE);
   io_wantread(g_self_pipe[0]);
 
-  defaul_signal_handlers();
   /* Init all sub systems. This call may fail with an exit() */
   trackerlogic_init();