diff --git a/CMakeLists.txt b/CMakeLists.txt index 2aad4e9a..d184ca1b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,17 +64,24 @@ endif() ######################################## # Build Variables - Shared Memory # ######################################## -if (NOT DEFINED ${NOSHM} ) +if (NOT DEFINED NOSHM ) add_definitions(-DSHM_ENABLED=1) endif() ######################################## # Build Variables - Thread Names # ######################################## -if (DEFINED ${WITH_THREADNAMES} ) +if (DEFINED WITH_THREADNAMES ) add_definitions(-DWITH_THREADNAMES=1) endif() +######################################## +# Build Variables - No Crash Check # +######################################## +if (DEFINED NOCRASHCHECK ) + add_definitions(-DNOCRASHCHECK=1) +endif() + ######################################## # Build Variables - Prepare for Build # ######################################## diff --git a/lib/shared_memory.cpp b/lib/shared_memory.cpp index f5f1483d..e7d1f2aa 100644 --- a/lib/shared_memory.cpp +++ b/lib/shared_memory.cpp @@ -772,6 +772,7 @@ namespace IPC { DEBUG_MSG(DLVL_WARN, "Client %u disconnect timed out", id); break; default: + #ifndef NOCRASHCHECK if(*counter > 10 && *counter < 126 ){ if(*counter < 30){ if (*counter > 15){ @@ -783,6 +784,7 @@ namespace IPC { Util::Procs::Murder(tmpPID); //improved kill } } + #endif break; } if (*counter == 127 || *counter == 126 || *counter == 255 || *counter == 254) {