Skip to content

Commit

Permalink
Merge branch 'master' of github.com:jhao104/proxy_pool into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
jhao104 committed Jul 19, 2019
2 parents 748e5a1 + 2000a25 commit a58978e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Run/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"""
__author__ = 'JHao'

import sys
import syssignal
from multiprocessing import Process

sys.path.append('.')
Expand All @@ -31,6 +31,14 @@ def run():
p_list.append(p2)
p3 = Process(target=RefreshRun, name='RefreshRun')
p_list.append(p3)

def kill_child_processes(signum,frame):
for p in p_list:
p.terminate()
sys.exit(1)

signal.signal(signal.SIGTERM, kill_child_processes)


for p in p_list:
p.daemon = True
Expand Down

0 comments on commit a58978e

Please sign in to comment.