userdbd: modernize signal handling
authorLennart Poettering <lennart@poettering.net>
Wed, 15 Mar 2023 13:59:32 +0000 (14:59 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 15 Mar 2023 14:57:03 +0000 (15:57 +0100)
commit54f5522664bfcf119e2ad58229a6be171249807d
treef5e173d982eda31211b409fbfdd7bd971b99d62c
parentf5abe8f95721213edd76c16ed829cc3e37d7bdc6
userdbd: modernize signal handling

Let's make use of SD_EVENT_SIGNAL_PROCMASK so that we don't have to mask
the signals manually. Let's use sd_event_set_exit_signal() instead of
rolling our own SIGTERM/SIGINT handling. Let's use "floating" event
sources instead of keeping references on our own.

Let's also debug log if we can't enable watchdog handling.
src/userdb/userdbd-manager.c
src/userdb/userdbd-manager.h
src/userdb/userdbd.c