-modifying tests to use new service MQ API, implementing more of service MQ API
[oweals/gnunet.git] / contrib / gnunet_janitor.py.in
index f68ff1cb2bf00fd9bf713da935b4c2e63f26bc3e..74fc70886490cc059b1b2d611dc3aeb8bcca4c70 100644 (file)
@@ -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