summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 6925d9ff1..0ff9361be 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3,17 +3,17 @@
#include "Root.h"
-#include <exception> //std::exception
-#include <csignal> //std::signal
-#include <stdlib.h> //exit()
+#include <exception>
+#include <csignal>
+#include <stdlib.h>
#ifdef _MSC_VER
#include <dbghelp.h>
#endif // _MSC_VER
// Here, we have some ALL CAPS variables, to give the impression that this is deeeep, gritty programming :P
-bool g_TERMINATE_EVENT_RAISED = false; // If something has told the server to stop; checked periodically in cRoot
-bool g_SERVER_TERMINATED = false; // Set to true when the server terminates, so our CTRL handler can then tell Windows to close the console
+bool g_TERMINATE_EVENT_RAISED = false; // If something has told the server to stop; checked periodically in cRoot
+bool g_SERVER_TERMINATED = false; // Set to true when the server terminates, so our CTRL handler can then tell Windows to close the console
@@ -49,7 +49,7 @@ bool g_ShouldLogCommOut;
-void NonCtrlHandler(int a_Signal)
+void NonCtrlHandler(int a_Signal)
{
LOGD("Terminate event raised from std::signal");
g_TERMINATE_EVENT_RAISED = true;
@@ -76,7 +76,7 @@ void NonCtrlHandler(int a_Signal)
case SIGINT:
case SIGTERM:
{
- std::signal(a_Signal, SIG_IGN); // Server is shutting down, wait for it...
+ std::signal(a_Signal, SIG_IGN); // Server is shutting down, wait for it...
break;
}
default: break;
@@ -88,7 +88,7 @@ void NonCtrlHandler(int a_Signal)
#if defined(_WIN32) && !defined(_WIN64) && defined(_MSC_VER)
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////
// Windows 32-bit stuff: when the server crashes, create a "dump file" containing the callstack of each thread and some variables; let the user send us that crash file for analysis
typedef BOOL (WINAPI *pMiniDumpWriteDump)(
@@ -158,9 +158,9 @@ BOOL CtrlHandler(DWORD fdwCtrlType)
g_TERMINATE_EVENT_RAISED = true;
LOGD("Terminate event raised from the Windows CtrlHandler");
- if (fdwCtrlType == CTRL_CLOSE_EVENT) // Console window closed via 'x' button, Windows will try to close immediately, therefore...
+ if (fdwCtrlType == CTRL_CLOSE_EVENT) // Console window closed via 'x' button, Windows will try to close immediately, therefore...
{
- while (!g_SERVER_TERMINATED) { cSleep::MilliSleep(100); } // Delay as much as possible to try to get the server to shut down cleanly
+ while (!g_SERVER_TERMINATED) { cSleep::MilliSleep(100); } // Delay as much as possible to try to get the server to shut down cleanly
}
return TRUE;
@@ -171,7 +171,7 @@ BOOL CtrlHandler(DWORD fdwCtrlType)
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////
// main:
int main( int argc, char **argv )
@@ -233,7 +233,7 @@ int main( int argc, char **argv )
std::signal(SIGABRT, NonCtrlHandler);
#ifdef SIGABRT_COMPAT
std::signal(SIGABRT_COMPAT, NonCtrlHandler);
- #endif // SIGABRT_COMPAT
+ #endif // SIGABRT_COMPAT
#endif
// DEBUG: test the dumpfile creation:
@@ -277,7 +277,7 @@ int main( int argc, char **argv )
try
#endif
{
- cRoot Root;
+ cRoot Root;
Root.Start();
}
#if !defined(ANDROID_NDK)