saned: catch SIGINT,SIGTERM in foreground listener

These signals were only being caught when daemonised but should also be
handled with the non-daemonised standalone server otherwise child
processes like the Avahi service can remain after the main process
is terminated.
734-support-for-canon-i-sensys-mf657cdw-mf650c-series
Andrew Bower 2024-10-12 15:05:42 +01:00
rodzic 4dcab5befb
commit 65442082a8
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -3264,11 +3264,11 @@ run_standalone (char *user)
close (fd);
setsid ();
signal(SIGINT, sig_int_term_handler);
signal(SIGTERM, sig_int_term_handler);
}
signal(SIGINT, sig_int_term_handler);
signal(SIGTERM, sig_int_term_handler);
if (user)
runas_user(user);