diff --git a/server/drone_main.cpp b/server/drone_main.cpp
index fdac216..6570f0a 100644
--- a/server/drone_main.cpp
+++ b/server/drone_main.cpp
@@ -28,9 +28,7 @@ along with this program. If not, see
#include
#include
-#ifdef Q_OS_UNIX
#include
-#endif
extern ProtocolManager *OstProtocolManager;
extern char *version;
@@ -100,6 +98,11 @@ int main(int argc, char *argv[])
qDebug("Failed to install SIGTERM handler. Cleanup may not happen!!!");
if (sigaction(SIGINT, &sa, NULL))
qDebug("Failed to install SIGINT handler. Cleanup may not happen!!!");
+#elif defined(Q_OS_WIN32)
+ if (signal(SIGTERM, cleanup) == SIG_ERR)
+ qDebug("Failed to install SIGTERM handler. Cleanup may not happen!!!");
+ if (signal(SIGINT, cleanup) == SIG_ERR)
+ qDebug("Failed to install SIGINT handler. Cleanup may not happen!!!");
#endif
exitCode = app.exec();