zenazn/goji — pull request #90 by mredivo (2014-11-24 22:12:29+00:00)
Title: Gracefully shut down on SIGTERM

Currently, Goji shuts down gracefully on a keyboard interrupt (Ctrl+C, SIGINT).

However, during OS system shutdown all processes receive a preliminary SIGTERM prior to being terminated with extreme prejudice. Goji does not handle the SIGTERM, and is therefore killed immediately.

This patch adds handling for SIGTERM, to permit graceful shutdown on system exit (or by standard init scripts).