summaryrefslogtreecommitdiffstats
path: root/src/import/import-common.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2024-02-16 18:20:51 +0100
committerLennart Poettering <lennart@poettering.net>2024-03-01 22:25:42 +0100
commit423bba9926c2d6cb3f3afbc3b37f90d1ece09b87 (patch)
tree3123e8ee2b8590cf8bd163dd1799b8954ffc4ab8 /src/import/import-common.c
parentimportd: trivial modernizations (diff)
downloadsystemd-423bba9926c2d6cb3f3afbc3b37f90d1ece09b87.tar.xz
systemd-423bba9926c2d6cb3f3afbc3b37f90d1ece09b87.zip
importd: modernize signal handling a bit
Diffstat (limited to 'src/import/import-common.c')
-rw-r--r--src/import/import-common.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/import/import-common.c b/src/import/import-common.c
index 4a8a9a9c20..9d1448545e 100644
--- a/src/import/import-common.c
+++ b/src/import/import-common.c
@@ -295,9 +295,8 @@ int import_allocate_event_with_signals(sd_event **ret) {
if (r < 0)
return log_error_errno(r, "Failed to allocate event loop: %m");
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT) >= 0);
- (void) sd_event_add_signal(event, NULL, SIGTERM, interrupt_signal_handler, NULL);
- (void) sd_event_add_signal(event, NULL, SIGINT, interrupt_signal_handler, NULL);
+ (void) sd_event_add_signal(event, NULL, SIGTERM|SD_EVENT_SIGNAL_PROCMASK, interrupt_signal_handler, NULL);
+ (void) sd_event_add_signal(event, NULL, SIGINT|SD_EVENT_SIGNAL_PROCMASK, interrupt_signal_handler, NULL);
*ret = TAKE_PTR(event);
return 0;