Browse Source

automatische speicherabbild erstellung bei server crashes

Kolja Strohm 6 years ago
parent
commit
3ec5885a81
2 changed files with 8 additions and 1 deletions
  1. 6 1
      Minigame Server/main.cpp
  2. 2 0
      build.bat

+ 6 - 1
Minigame Server/main.cpp

@@ -3,12 +3,17 @@
 #include <iostream>
 #include <fstream>
 #include <Globals.h>
+#include <sys/resource.h>
 
 int main()
 {
+	struct rlimit core_limits;
+	core_limits.rlim_cur = core_limits.rlim_max = RLIM_INFINITY;
+	setrlimit(RLIMIT_CORE, &core_limits);
+
     Framework::initFramework();
     Zeit *z = getZeit();
-    Text *pfad = new Text( "../log/login/" );
+    Text *pfad = new Text( "../log/minigame/" );
     pfad->append( z->getZeit( "y-m-d h-i-s.log" ) );
     z->release();
     DateiPfadErstellen( pfad->getThis() );

+ 2 - 0
build.bat

@@ -0,0 +1,2 @@
+"D:\Visual Studio 2017\MSBuild\15.0\Bin\MSBuild.exe" "Minigame Server.sln" /t:rebuild /p:configuration=debug /p:platform=x64
+"D:\Visual Studio 2017\MSBuild\15.0\Bin\MSBuild.exe" "Minigame Server.sln" /t:rebuild /p:configuration=release /p:platform=x64