derks/cement — Issue #77: Add signal handler for SIGINT/SIGTERM/Etc
Author: derks
Created: 2011-11-10 22:19:06+00:00
State: open
Labels: 2.x, feature

Add a standard signal handler for sigint and sigterm, and run a cement_sigint_hook, cement_sigterm_hook, etc within the respective signal. May want to allow the ability to disable this... perhaps with a 'with_signals=False' option to lay_cement/CementApp.

Might make sense just to make a generic cement_signal_hook(app, signum, frame) ... and within the hook one could easily just do a 'if signum == signal.SIGINT:' or ... 'if signum == signal.SIGHUP:'.... etc. rather than a seperate hook for every signal.