aboutsummaryrefslogtreecommitdiffstats
path: root/src/event
diff options
context:
space:
mode:
Diffstat (limited to 'src/event')
-rw-r--r--src/event/SignalMonitor.cxx8
-rw-r--r--src/event/SignalMonitor.hxx7
2 files changed, 15 insertions, 0 deletions
diff --git a/src/event/SignalMonitor.cxx b/src/event/SignalMonitor.cxx
index ee72dea72..8c8527a77 100644
--- a/src/event/SignalMonitor.cxx
+++ b/src/event/SignalMonitor.cxx
@@ -63,6 +63,8 @@ public:
SocketMonitor::Steal();
}
+ using SocketMonitor::GetEventLoop;
+
#ifdef USE_SIGNALFD
void Update(sigset_t &mask) {
const bool was_open = SocketMonitor::IsDefined();
@@ -153,6 +155,12 @@ SignalMonitorFinish()
monitor.Destruct();
}
+EventLoop &
+SignalMonitorGetEventLoop()
+{
+ return monitor->GetEventLoop();
+}
+
void
SignalMonitorRegister(int signo, SignalHandler handler)
{
diff --git a/src/event/SignalMonitor.hxx b/src/event/SignalMonitor.hxx
index 94ab0aa30..1ecccd40b 100644
--- a/src/event/SignalMonitor.hxx
+++ b/src/event/SignalMonitor.hxx
@@ -41,6 +41,13 @@ void
SignalMonitorFinish();
/**
+ * Obtain a reference to the #EventLoop that was passed to
+ * SignalMonitorInit().
+ */
+EventLoop &
+SignalMonitorGetEventLoop();
+
+/**
* Register a handler for the specified signal. The handler will be
* invoked in a safe context.
*/