Created
April 25, 2014 09:04
-
-
Save paulegan/11282894 to your computer and use it in GitHub Desktop.
uwsgi signal test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import signal | |
def handler(signum, frame): | |
print 'trapped', signum | |
signal.signal(signal.SIGHUP, handler) | |
signal.signal(signal.SIGALRM, handler) | |
signal.alarm(1) | |
while True: | |
signal.pause() | |
print 'signal received' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uwsgi --socket :8000 --master --mule=mule.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment