Commit 96814397 authored by Max Kellermann's avatar Max Kellermann

sig_handlers: disable on WIN32

WIN32 doesn't have POSIX signals. Disable the code. For a complete port, we will have to implement the WIN32 equivalent.
parent 2cf96abc
...@@ -18,6 +18,9 @@ ...@@ -18,6 +18,9 @@
*/ */
#include "sig_handlers.h" #include "sig_handlers.h"
#ifndef WIN32
#include "log.h" #include "log.h"
#include "main.h" #include "main.h"
#include "event_pipe.h" #include "event_pipe.h"
...@@ -52,8 +55,11 @@ handle_reload_event(void) ...@@ -52,8 +55,11 @@ handle_reload_event(void)
cycle_log_files(); cycle_log_files();
} }
#endif
void initSigHandlers(void) void initSigHandlers(void)
{ {
#ifndef WIN32
struct sigaction sa; struct sigaction sa;
sa.sa_flags = 0; sa.sa_flags = 0;
...@@ -68,4 +74,5 @@ void initSigHandlers(void) ...@@ -68,4 +74,5 @@ void initSigHandlers(void)
event_pipe_register(PIPE_EVENT_RELOAD, handle_reload_event); event_pipe_register(PIPE_EVENT_RELOAD, handle_reload_event);
sa.sa_handler = reload_signal_handler; sa.sa_handler = reload_signal_handler;
x_sigaction(SIGHUP, &sa); x_sigaction(SIGHUP, &sa);
#endif
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment