diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-01-26 17:15:05 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-01-26 17:15:05 +0100 |
commit | ea9de4bbb70192626b00a810482671cf14bd7f8c (patch) | |
tree | e2ba3284656d9a8e9ed290be3c655bcd982e5ce8 | |
parent | Merge pull request #589 from mc-server/minecartimprovements (diff) | |
download | cuberite-ea9de4bbb70192626b00a810482671cf14bd7f8c.tar cuberite-ea9de4bbb70192626b00a810482671cf14bd7f8c.tar.gz cuberite-ea9de4bbb70192626b00a810482671cf14bd7f8c.tar.bz2 cuberite-ea9de4bbb70192626b00a810482671cf14bd7f8c.tar.lz cuberite-ea9de4bbb70192626b00a810482671cf14bd7f8c.tar.xz cuberite-ea9de4bbb70192626b00a810482671cf14bd7f8c.tar.zst cuberite-ea9de4bbb70192626b00a810482671cf14bd7f8c.zip |
-rw-r--r-- | src/main.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 06b344c25..0f6895d03 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -68,9 +68,10 @@ void NonCtrlHandler(int a_Signal) LOGERROR("Details | SIGABRT: Server self-terminated due to an internal fault"); break; } + case SIGINT: case SIGTERM: { - std::signal(SIGTERM, 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; @@ -224,6 +225,10 @@ int main( int argc, char **argv ) std::signal(SIGSEGV, NonCtrlHandler); std::signal(SIGTERM, NonCtrlHandler); std::signal(SIGINT, NonCtrlHandler); + std::signal(SIGABRT, NonCtrlHandler); + #ifdef SIGABRT_COMPAT + std::signal(SIGABRT_COMPAT, NonCtrlHandler); + #endif // SIGABRT_COMPAT #endif // DEBUG: test the dumpfile creation: |