diff options
author | madmaxoft <github@xoft.cz> | 2014-07-17 19:13:23 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-07-17 19:13:23 +0200 |
commit | 7fff12bfacbb4bef1c02cea0ec10fdc9a6fb64e4 (patch) | |
tree | 54a0e32d887554b1131c8c9123027f16a7faf5d8 /src/main.cpp | |
parent | Fixed basic whitespace problems. (diff) | |
download | cuberite-7fff12bfacbb4bef1c02cea0ec10fdc9a6fb64e4.tar cuberite-7fff12bfacbb4bef1c02cea0ec10fdc9a6fb64e4.tar.gz cuberite-7fff12bfacbb4bef1c02cea0ec10fdc9a6fb64e4.tar.bz2 cuberite-7fff12bfacbb4bef1c02cea0ec10fdc9a6fb64e4.tar.lz cuberite-7fff12bfacbb4bef1c02cea0ec10fdc9a6fb64e4.tar.xz cuberite-7fff12bfacbb4bef1c02cea0ec10fdc9a6fb64e4.tar.zst cuberite-7fff12bfacbb4bef1c02cea0ec10fdc9a6fb64e4.zip |
Diffstat (limited to '')
-rw-r--r-- | src/main.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/main.cpp b/src/main.cpp index c8ff31f07..f485d8f8f 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 @@ -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; @@ -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; @@ -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: |