Created
June 23, 2016 16:51
-
-
Save povilasb/c687fc7613ff4dad882cc299aee29e7f to your computer and use it in GitHub Desktop.
Unix signal handling in python
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("SIGHUP") | |
signal.signal(signal.SIGHUP, handler) | |
print("Press enter to finish") | |
input() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment