Skip to content

Instantly share code, notes, and snippets.

@jcgruenhage
Created November 16, 2019 14:42
Show Gist options
  • Save jcgruenhage/14aa1bb4c3c4da62a3c367876ea26f46 to your computer and use it in GitHub Desktop.
Save jcgruenhage/14aa1bb4c3c4da62a3c367876ea26f46 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
import signal
import time
import sys
def sigterm_handler(a, b):
print("Hello World!")
sys.exit()
signal.signal(signal.SIGTERM, sigterm_handler);
while(True):
time.sleep(100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment