From 476fdc99523c458506416b06d9b939d1e6065364 Mon Sep 17 00:00:00 2001 From: worktycho Date: Sun, 1 Jun 2014 17:05:51 +0100 Subject: Use abort in SIGSEGV and SIGABRT handlers This should cause Mcserver to generate core dumps when it crashes. --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main.cpp b/src/main.cpp index 68eea7f4d..1f458b0c1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -61,7 +61,7 @@ void NonCtrlHandler(int a_Signal) std::signal(SIGSEGV, SIG_DFL); LOGERROR(" D: | MCServer has encountered an error and needs to close"); LOGERROR("Details | SIGSEGV: Segmentation fault"); - exit(EXIT_FAILURE); + abort(EXIT_FAILURE); } case SIGABRT: #ifdef SIGABRT_COMPAT @@ -71,7 +71,7 @@ void NonCtrlHandler(int a_Signal) std::signal(a_Signal, SIG_DFL); LOGERROR(" D: | MCServer has encountered an error and needs to close"); LOGERROR("Details | SIGABRT: Server self-terminated due to an internal fault"); - exit(EXIT_FAILURE); + abort(EXIT_FAILURE); } case SIGINT: case SIGTERM: -- cgit v1.2.3