提交 0c48fcd0 编写于 作者: J Jiawei Wang 提交者: bjjwwang

Merge pull request #1490 from felixhjh/dev_stop

fix windows gid recording
上级 3bea13c4
...@@ -16,6 +16,7 @@ import signal ...@@ -16,6 +16,7 @@ import signal
import os import os
import time import time
import json import json
import platform
from paddle_serving_server.env import CONF_HOME from paddle_serving_server.env import CONF_HOME
...@@ -91,7 +92,10 @@ def dump_pid_file(portList, model): ...@@ -91,7 +92,10 @@ def dump_pid_file(portList, model):
dump_pid_file([9494, 10082], 'serve') dump_pid_file([9494, 10082], 'serve')
''' '''
pid = os.getpid() pid = os.getpid()
gid = os.getpgid(pid) if platform.system() == "Windows":
gid = pid
else:
gid = os.getpgid(pid)
pidInfoList = [] pidInfoList = []
filepath = os.path.join(CONF_HOME, "ProcessInfo.json") filepath = os.path.join(CONF_HOME, "ProcessInfo.json")
if os.path.exists(filepath): if os.path.exists(filepath):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册