diff options
Diffstat (limited to '')
-rw-r--r-- | src/SignalHandlers.cxx (renamed from src/sig_handlers.c) | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/sig_handlers.c b/src/SignalHandlers.cxx index b23f9e778..d438eb703 100644 --- a/src/sig_handlers.c +++ b/src/SignalHandlers.cxx @@ -18,13 +18,14 @@ */ #include "config.h" -#include "sig_handlers.h" +#include "SignalHandlers.hxx" #ifndef WIN32 -#include "log.h" -#include "main.h" -#include "event_pipe.h" +#include "Log.hxx" +#include "Main.hxx" +#include "event/Loop.hxx" +#include "GlobalEvents.hxx" #include "mpd_error.h" #include <glib.h> @@ -35,12 +36,12 @@ static void exit_signal_handler(G_GNUC_UNUSED int signum) { - g_main_loop_quit(main_loop); + GlobalEvents::Emit(GlobalEvents::SHUTDOWN); } static void reload_signal_handler(G_GNUC_UNUSED int signum) { - event_pipe_emit_fast(PIPE_EVENT_RELOAD); + GlobalEvents::Emit(GlobalEvents::RELOAD); } static void @@ -73,7 +74,7 @@ void initSigHandlers(void) x_sigaction(SIGINT, &sa); x_sigaction(SIGTERM, &sa); - event_pipe_register(PIPE_EVENT_RELOAD, handle_reload_event); + GlobalEvents::Register(GlobalEvents::RELOAD, handle_reload_event); sa.sa_handler = reload_signal_handler; x_sigaction(SIGHUP, &sa); #endif |