From 9612f76c3f1f816c0ecee32123fdf36ba8d78b6e Mon Sep 17 00:00:00 2001 From: Jonathan Creasy Date: Tue, 4 Dec 2018 15:32:34 -0800 Subject: [PATCH] Fixes #378 handle kill proces error --- tcollector.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tcollector.py b/tcollector.py index 3236fc4c..aab6bb8c 100755 --- a/tcollector.py +++ b/tcollector.py @@ -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():