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:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user