marmots/testsig.py

9 lines
130 B
Python
Raw Normal View History

2011-03-19 00:10:02 +00:00
import signal
def handler(signum, frame):
print "signal:", signum, frame
signal.signal(signal.SIGINT, handler)
input()