Listen for SIGTERM as well and gracefully shutdown in that case.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4959 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2008-03-05 23:28:28 +00:00
parent e8b5d41fb8
commit 8a745b30e0
4 changed files with 19 additions and 1 deletions
@@ -42,6 +42,15 @@ public abstract class AbstractSignalHandler
*/
protected abstract boolean registerHandlers ();
/**
* Implementations should call this method when a SIGTERM is received.
*/
protected void termReceived ()
{
log.info("Shutdown initiated by TERM signal.");
_server.queueShutdown();
}
/**
* Implementations should call this method when a SIGINT is received.
*/