def handler(self):
'''
the signal/event alarm handler. This code is executed
when the alarm is off.
'''
if self.process.poll() != None:
return
try:
if platform.system() == 'Linux':
self.process.send_signal(signal.SIGUSR2)
elif platform.system() == 'Windows':
event_object = ctypes.windll.kernel32.OpenEventA(
EVENT_ALL_ACCESS, False, self.event_name)
ctypes.windll.kernel32.SetEvent(event_object)
except OSError, ex:
print '[!] ERROR: ', ex
评论列表
文章目录