From 0c48fcd04285ce9a9a073670a58cff04c0350377 Mon Sep 17 00:00:00 2001 From: Jiawei Wang Date: Fri, 12 Nov 2021 18:14:58 +0800 Subject: [PATCH] Merge pull request #1490 from felixhjh/dev_stop fix windows gid recording --- python/paddle_serving_server/util.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/paddle_serving_server/util.py b/python/paddle_serving_server/util.py index 85c9341c..8062d9a7 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): -- GitLab