how to implement a watchdog timer in python?,sys.exit()