1 2 3 4 5 6 7 8 9 10 11 12 13
import signal import time signal.pthread_sigmask(signal.SIG_SETMASK, {signal.SIGTERM}) def main(): while True: time.sleep(1) if __name__ == "__main__": main()