From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 16898138D0E for ; Fri, 10 Jul 2015 12:54:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9607CE0917; Fri, 10 Jul 2015 12:54:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 429D4E0917 for ; Fri, 10 Jul 2015 12:54:06 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4A1413405CF for ; Fri, 10 Jul 2015 12:54:05 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9EC0C73C for ; Fri, 10 Jul 2015 12:54:03 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: <1436533002.1c5666dd6ae518dfd88409d248fdcc7fd4298b68.blueness@gentoo> Subject: [gentoo-commits] proj/grss:master commit in: grs/ X-VCS-Repository: proj/grss X-VCS-Files: grs/Interpret.py X-VCS-Directories: grs/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: 1c5666dd6ae518dfd88409d248fdcc7fd4298b68 X-VCS-Branch: master Date: Fri, 10 Jul 2015 12:54:03 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 642747cc-266e-40ba-be73-29ce1c81a252 X-Archives-Hash: 5c0ab3ce8d99036bc90585e596f68b20 commit: 1c5666dd6ae518dfd88409d248fdcc7fd4298b68 Author: Anthony G. Basile gentoo org> AuthorDate: Fri Jul 10 12:56:42 2015 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Fri Jul 10 12:56:42 2015 +0000 URL: https://gitweb.gentoo.org/proj/grss.git/commit/?id=1c5666dd grs/Interpret.py: more aggressively send TERM/KILL signals. grs/Interpret.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/grs/Interpret.py b/grs/Interpret.py index bea0bf2..4749561 100644 --- a/grs/Interpret.py +++ b/grs/Interpret.py @@ -4,6 +4,8 @@ import os import re import signal import sys +import time + from grs.Constants import CONST from grs.Daemon import Daemon from grs.Log import Log @@ -44,8 +46,12 @@ class Interpret(Daemon): if mypid == pid: continue try: - os.kill(pid, signal.SIGTERM) - os.kill(pid, signal.SIGKILL) + for i in range(10): + os.kill(pid, signal.SIGTERM) + time.sleep(0.2) + while True: + os.kill(pid, signal.SIGKILL) + time.sleep(0.2) except ProcessLookupError: pass try: