summaryrefslogtreecommitdiffstats
path: root/sd_event_loop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sd_event_loop.cpp')
-rw-r--r--sd_event_loop.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/sd_event_loop.cpp b/sd_event_loop.cpp
index ed3e547..d4dc456 100644
--- a/sd_event_loop.cpp
+++ b/sd_event_loop.cpp
@@ -175,6 +175,7 @@ int EventLoop::startEventLoop()
int r = 0;
sigset_t ss;
sd_event_source* source = nullptr;
+ auto bus = ipmid_get_sd_bus_connection();
r = sd_event_default(&event);
if (r < 0)
@@ -182,6 +183,13 @@ int EventLoop::startEventLoop()
goto finish;
}
+ // Attach the bus to sd_event to service user requests
+ r = sd_bus_attach_event(bus, event, SD_EVENT_PRIORITY_NORMAL);
+ if (r < 0)
+ {
+ goto finish;
+ }
+
if (sigemptyset(&ss) < 0 || sigaddset(&ss, SIGTERM) < 0 ||
sigaddset(&ss, SIGINT) < 0)
{
OpenPOWER on IntegriCloud