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.
This commit is contained in:
parent
2cf96abcc1
commit
96814397ad
@ -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)
|
|||||||
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)
|
|||||||
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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user