diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2009-10-17 21:38:58 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2009-10-17 21:41:35 +0200 |
commit | a5666899266206df082c202e5c0ee1e7e3cb8e63 (patch) | |
tree | 0050b34e01c16f1c83302394595cfbe3fa197c12 | |
parent | ce2fc28dc790b02c7a9beb99ca39204aa78906ab (diff) | |
download | manaserv-a5666899266206df082c202e5c0ee1e7e3cb8e63.tar.gz manaserv-a5666899266206df082c202e5c0ee1e7e3cb8e63.tar.bz2 manaserv-a5666899266206df082c202e5c0ee1e7e3cb8e63.tar.xz manaserv-a5666899266206df082c202e5c0ee1e7e3cb8e63.zip |
Also close gracefully on receiving the TERM signal
Probably the most important signal to handle gracefully...
-rw-r--r-- | src/account-server/main-account.cpp | 1 | ||||
-rw-r--r-- | src/game-server/main-game.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/account-server/main-account.cpp b/src/account-server/main-account.cpp index 9d2e9710..06c11c95 100644 --- a/src/account-server/main-account.cpp +++ b/src/account-server/main-account.cpp @@ -94,6 +94,7 @@ static void initialize() signal(SIGQUIT, closeGracefully); #endif signal(SIGINT, closeGracefully); + signal(SIGTERM, closeGracefully); // Set enet to quit on exit. atexit(enet_deinitialize); diff --git a/src/game-server/main-game.cpp b/src/game-server/main-game.cpp index 2a9cee57..076fd05e 100644 --- a/src/game-server/main-game.cpp +++ b/src/game-server/main-game.cpp @@ -101,6 +101,7 @@ void initialize() signal(SIGQUIT, closeGracefully); #endif signal(SIGINT, closeGracefully); + signal(SIGTERM, closeGracefully); /* * If the path values aren't defined, we set the default |