tests/server/dnsd: fix to install signal handlers on startup

To sync with the rest of code which already handled `got_exit_signal`
and did the restoration on exit. Also syncing with rest of servers.

Also: turn off `keep_sigalrm` to sync with most servers.

Closes #22499
This commit is contained in:
Viktor Szakats 2026-08-06 08:58:22 +02:00
parent 1637bbc9ce
commit fd24c4bcf4
No known key found for this signature in database

View file

@ -868,6 +868,8 @@ static int test_dnsd(int argc, const char **argv)
snprintf(loglockfile, sizeof(loglockfile), "%s/%s/dnsd-%s.lock",
logdir, SERVERLOGS_LOCKDIR, socket_type);
install_signal_handlers(FALSE);
#ifdef USE_IPV6
if(socket_domain == AF_INET6)
sock = socket(AF_INET6, SOCK_DGRAM, 0);
@ -1077,7 +1079,8 @@ dnsd_cleanup:
}
clear_resp_queue();
restore_signal_handlers(TRUE);
restore_signal_handlers(FALSE);
if(got_exit_signal) {
logmsg("========> %s dnsd (port: %d pid: %ld) exits with signal (%d)",