{
sigterm_count = 1;
}
-
+#ifndef OS_WIN32
/**
* SIGUSR2 handler. Just set sigusr2_count. The main loop will act on
* it.
{
sighup_count = 1;
}
+#endif
#ifdef DBG_MEM_ALLOC
#ifndef _GLOBAL_MEM_
return -1;
}
SCLogInfo("Current directory is set to: %s", path);
- daemon = 1;
SCServiceInit(argc, argv);
}
{
/* registering signals we use */
UtilSignalHandlerSetup(SIGINT, SignalHandlerSigint);
- UtilSignalHandlerSetup(SIGUSR2, SignalHandlerSigusr2);
UtilSignalHandlerSetup(SIGTERM, SignalHandlerSigterm);
- UtilSignalHandlerSetup(SIGPIPE, SIG_IGN);
- UtilSignalHandlerSetup(SIGSYS, SIG_IGN);
-
#ifndef OS_WIN32
- /* SIGHUP is not implemented on WIN32 */
+ UtilSignalHandlerSetup(SIGUSR2, SignalHandlerSigusr2);
UtilSignalHandlerSetup(SIGHUP, SignalHandlerSigHup);
+ UtilSignalHandlerSetup(SIGPIPE, SIG_IGN);
+ UtilSignalHandlerSetup(SIGSYS, SIG_IGN);
/* Try to get user/group to run suricata as if
command line as not decide of that */
static void PostRunStartedDetectSetup(SCInstance *suri)
{
+#ifndef OS_WIN32
/* registering signal handlers we use. We register usr2 here, so that one
* can't call it during the first sig load phase or while threads are still
* starting up. */
if (DetectEngineEnabled() && suri->sig_file == NULL &&
suri->delayed_detect == 0)
UtilSignalHandlerSetup(SIGUSR2, SignalHandlerSigusr2);
-
+#endif
if (suri->delayed_detect) {
/* force 'reload', this will load the rules and swap engines */
DetectEngineReload(suri);
#ifdef OS_WIN32
/* service initialization */
- if (WindowsInit(argc, argv) != 0) {
+ if (WindowsInitService(argc, argv) != 0) {
exit(EXIT_FAILURE);
}
#endif /* OS_WIN32 */