This commit is contained in:
aozhiwei 2019-09-04 15:04:52 +08:00
parent 7307b35c5c
commit 0db2f6a7d1

View File

@ -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)