timesyncd: hook up memory pressure + sigrtmin18

This commit is contained in:
Lennart Poettering
2023-03-01 09:43:23 +01:00
parent 92e1a20998
commit 6e6e45076b
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -15,6 +15,7 @@
#include "alloc-util.h"
#include "bus-polkit.h"
#include "common-signal.h"
#include "dns-domain.h"
#include "event-util.h"
#include "fd-util.h"
@@ -1129,6 +1130,11 @@ int manager_new(Manager **ret) {
(void) sd_event_add_signal(m->event, NULL, SIGTERM, NULL, NULL);
(void) sd_event_add_signal(m->event, NULL, SIGINT, NULL, NULL);
(void) sd_event_add_signal(m->event, NULL, SIGRTMIN+18, sigrtmin18_handler, NULL);
r = sd_event_add_memory_pressure(m->event, NULL, NULL, NULL);
if (r < 0)
log_debug_errno(r, "Failed allocate memory pressure event source, ignoring: %m");
(void) sd_event_set_watchdog(m->event, true);
+1 -1
View File
@@ -174,7 +174,7 @@ static int run(int argc, char *argv[]) {
return log_error_errno(r, "Failed to drop privileges: %m");
}
assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT, -1) >= 0);
assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGTERM, SIGINT, SIGRTMIN+18, -1) >= 0);
r = manager_new(&m);
if (r < 0)