#
# 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
#
import shutil
import time
import signal
+import terminate
if os.name == 'nt':
from win32com.client import GetObject
WMI = GetObject('winmgmts:')
- killsignal = signal.SIGTERM # any valid value will result in TerminateProcess()
-else:
- killsignal = signal.SIGKILL
def get_process_list ():
result = []
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]), killsignal)
+ terminate.safe_terminate_process_by_pid (int (p[0]), 1)
except OSError as e:
print ("failed: {0}".format (e))
pass
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]), killsignal)
+ terminate.safe_terminate_process_by_pid (int (p[0]), 1)
except OSError as e:
print ("failed: {0}".format (e))
pass