Commit 677895a5 authored by Łukasz Nowak's avatar Łukasz Nowak

Remove not filled kill lists.

parent b228b137
...@@ -27,24 +27,12 @@ def log(message): ...@@ -27,24 +27,12 @@ def log(message):
print time.strftime('%Y/%m/%d %H:%M:%S'), message print time.strftime('%Y/%m/%d %H:%M:%S'), message
process_group_pid_set = set() process_group_pid_set = set()
process_pid_file_list = []
process_command_list = []
def sigterm_handler(signal, frame): def sigterm_handler(signal, frame):
for pgpid in process_group_pid_set: for pgpid in process_group_pid_set:
try: try:
os.killpg(pgpid, signal.SIGTERM) os.killpg(pgpid, signal.SIGTERM)
except: except:
pass pass
for pid_file in process_pid_file_list:
try:
os.kill(int(open(pid_file).read().strip()), signal.SIGTERM)
except:
pass
for p in process_command_list:
try:
subprocess.call(p)
except:
pass
sys.exit(1) sys.exit(1)
signal.signal(signal.SIGTERM, sigterm_handler) signal.signal(signal.SIGTERM, sigterm_handler)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment