From 0db2f6a7d13bf18a1ea9771f676944bdc0eb5705 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 4 Sep 2019 15:04:52 +0800 Subject: [PATCH] 1 --- server/bin/manage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/bin/manage.py b/server/bin/manage.py index 583a0f1..89ca28b 100755 --- a/server/bin/manage.py +++ b/server/bin/manage.py @@ -36,7 +36,7 @@ def stop(instance_id, node_id, times = 0): for pid in pids: exepath = getExePath(pid) cmdline = getExeCmdLine(pid) - if cmdline == ("./gameserver\0-i\0%d\0-n\0%d\0" % (instance_id, node_id)): + if cmdline.find("./gameserver\0-i\0%d\0-n\0%d\0" % (instance_id, node_id)) > -1: os.popen('kill -9 %d' % int(pid)) #endfor gameserver_ids = getRuningProgramPids('gameserver') @@ -44,7 +44,7 @@ def stop(instance_id, node_id, times = 0): for pid in pids: exepath = getExePath(pid) cmdline = getExeCmdLine(pid) - if cmdline == ("./gameserver\0-i\0%d\0-n\0%d\0" % (instance_id, node_id)): + if cmdline.find("./gameserver\0-i\0%d\0-n\0%d\0" % (instance_id, node_id)) > -1: time.sleep(1) stop(instance_id, node_id, times + 1)