Skip to content

Commit

Permalink
Fixes #378 handle kill proces error
Browse files Browse the repository at this point in the history
  • Loading branch information
johann8384 committed Dec 4, 2018
1 parent b684402 commit 9612f76
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tcollector.py
Original file line number Diff line number Diff line change
Expand Up @@ -1278,7 +1278,10 @@ def shutdown_signal(signum, frame):


def kill(proc, signum=signal.SIGTERM):
os.killpg(proc.pid, signum)
try:
os.killpg(proc.pid, signum)
except: # pylint: disable=bare-except
LOG.info('already killed: %s', proc.pid)


def shutdown():
Expand Down

0 comments on commit 9612f76

Please sign in to comment.