X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=contrib%2Fgnunet_janitor.py.in;h=74fc70886490cc059b1b2d611dc3aeb8bcca4c70;hb=08f1726b6552ac29830637e9f7be4d42e2ea4294;hp=f68ff1cb2bf00fd9bf713da935b4c2e63f26bc3e;hpb=3e152ec2a0809d8e4f633b61f012ff7179e6ac7f;p=oweals%2Fgnunet.git diff --git a/contrib/gnunet_janitor.py.in b/contrib/gnunet_janitor.py.in index f68ff1cb2..74fc70886 100644 --- a/contrib/gnunet_janitor.py.in +++ b/contrib/gnunet_janitor.py.in @@ -14,8 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with GNUnet; see the file COPYING. If not, write to the -# Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. +# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. # # Finds any gnunet processes still running in the system and kills them # @@ -30,6 +30,7 @@ import sys import shutil import time import signal +import terminate if os.name == 'nt': from win32com.client import GetObject @@ -60,7 +61,7 @@ def main (): if re.match (r'gnunet-service-arm', p[1]): print ("killing arm process {0:5} {1}".format (p[0], p[1])) try: - os.kill (int (p[0]), signal.SIGKILL) + terminate.safe_terminate_process_by_pid (int (p[0]), 1) except OSError as e: print ("failed: {0}".format (e)) pass @@ -68,7 +69,7 @@ def main (): if not re.match (r'gnunet-service-arm', p[1]): print ("killing non-arm process {0:5} {1}".format (p[0], p[1])) try: - os.kill (int (p[0]), signal.SIGKILL) + terminate.safe_terminate_process_by_pid (int (p[0]), 1) except OSError as e: print ("failed: {0}".format (e)) pass