diff --git a/python/paddle_serving_server/util.py b/python/paddle_serving_server/util.py index 85c9341c7848631394d348521131c3e0ae1455d7..8062d9a70b220d1863ab8b079a1d13259495bb64 100644 --- a/python/paddle_serving_server/util.py +++ b/python/paddle_serving_server/util.py @@ -16,6 +16,7 @@ import signal import os import time import json +import platform from paddle_serving_server.env import CONF_HOME @@ -91,7 +92,10 @@ def dump_pid_file(portList, model): dump_pid_file([9494, 10082], 'serve') ''' pid = os.getpid() - gid = os.getpgid(pid) + if platform.system() == "Windows": + gid = pid + else: + gid = os.getpgid(pid) pidInfoList = [] filepath = os.path.join(CONF_HOME, "ProcessInfo.json") if os.path.exists(filepath):