summaryrefslogtreecommitdiff
path: root/src/home/homed-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/home/homed-manager.c')
-rw-r--r--src/home/homed-manager.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/home/homed-manager.c b/src/home/homed-manager.c
index e1af7aa1ad..76b038cadd 100644
--- a/src/home/homed-manager.c
+++ b/src/home/homed-manager.c
@@ -18,6 +18,7 @@
#include "bus-log-control-api.h"
#include "bus-polkit.h"
#include "clean-ipc.h"
+#include "common-signal.h"
#include "conf-files.h"
#include "device-util.h"
#include "dirent-util.h"
@@ -225,6 +226,15 @@ int manager_new(Manager **ret) {
if (r < 0)
return r;
+ r = sd_event_add_memory_pressure(m->event, NULL, NULL, NULL);
+ if (r < 0)
+ log_full_errno(ERRNO_IS_NOT_SUPPORTED(r) || ERRNO_IS_PRIVILEGE(r) || (r == -EHOSTDOWN) ? LOG_DEBUG : LOG_WARNING, r,
+ "Failed to allocate memory pressure watch, ignoring: %m");
+
+ r = sd_event_add_signal(m->event, NULL, SIGRTMIN+18, sigrtmin18_handler, NULL);
+ if (r < 0)
+ return r;
+
(void) sd_event_set_watchdog(m->event, true);
m->homes_by_uid = hashmap_new(&homes_by_uid_hash_ops);