提交 edebb2ca 编写于 作者: F felixhjh

change pid recording to record gid

上级 4ab13697
......@@ -91,6 +91,7 @@ def dump_pid_file(portList, model):
dump_pid_file([9494, 10082], 'serve')
'''
pid = os.getpid()
gid = os.getpgid(pid)
pidInfoList = []
filepath = os.path.join(CONF_HOME, "ProcessInfo.json")
if os.path.exists(filepath):
......@@ -105,7 +106,7 @@ def dump_pid_file(portList, model):
pidInfoList.remove(info)
with open(filepath, "w") as fp:
info ={"pid": pid, "port" : portList, "model" : str(model), "start_time" : time.time()}
info ={"pid": gid, "port" : portList, "model" : str(model), "start_time" : time.time()}
pidInfoList.append(info)
json.dump(pidInfoList, fp)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册