

import signal, os, sys

import thread
print thread.get_ident()


def handler(signum, frame):
    print 'Signal handler called with signal', signum
    raise IOError("Couldn't open device!")

# Set the signal handler and a 5-second alarm
signal.signal(4, handler)

#signal
