1
This commit is contained in:
parent
7307b35c5c
commit
0db2f6a7d1
@ -36,7 +36,7 @@ def stop(instance_id, node_id, times = 0):
|
|||||||
for pid in pids:
|
for pid in pids:
|
||||||
exepath = getExePath(pid)
|
exepath = getExePath(pid)
|
||||||
cmdline = getExeCmdLine(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))
|
os.popen('kill -9 %d' % int(pid))
|
||||||
#endfor
|
#endfor
|
||||||
gameserver_ids = getRuningProgramPids('gameserver')
|
gameserver_ids = getRuningProgramPids('gameserver')
|
||||||
@ -44,7 +44,7 @@ def stop(instance_id, node_id, times = 0):
|
|||||||
for pid in pids:
|
for pid in pids:
|
||||||
exepath = getExePath(pid)
|
exepath = getExePath(pid)
|
||||||
cmdline = getExeCmdLine(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)
|
time.sleep(1)
|
||||||
stop(instance_id, node_id, times + 1)
|
stop(instance_id, node_id, times + 1)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user