summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-01-26 17:15:05 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-01-26 17:15:05 +0100
commitea9de4bbb70192626b00a810482671cf14bd7f8c (patch)
treee2ba3284656d9a8e9ed290be3c655bcd982e5ce8 /src
parentMerge pull request #589 from mc-server/minecartimprovements (diff)
downloadcuberite-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
Diffstat (limited to '')
-rw-r--r--src/main.cpp7
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: