Skip to content

Commit 0c48fcd

Browse files
committed
Merge pull request PaddlePaddle#1490 from felixhjh/dev_stop
fix windows gid recording
1 parent 3bea13c commit 0c48fcd

File tree

1 file changed

+5
-1
lines changed
  • python/paddle_serving_server

1 file changed

+5
-1
lines changed

python/paddle_serving_server/util.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import os
1717
import time
1818
import json
19+
import platform
1920
from paddle_serving_server.env import CONF_HOME
2021

2122

@@ -91,7 +92,10 @@ def dump_pid_file(portList, model):
9192
dump_pid_file([9494, 10082], 'serve')
9293
'''
9394
pid = os.getpid()
94-
gid = os.getpgid(pid)
95+
if platform.system() == "Windows":
96+
gid = pid
97+
else:
98+
gid = os.getpgid(pid)
9599
pidInfoList = []
96100
filepath = os.path.join(CONF_HOME, "ProcessInfo.json")
97101
if os.path.exists(filepath):

0 commit comments

Comments
 (0)