This is an automated email from the ASF dual-hosted git repository.
tqchen pushed a commit to branch v0.6
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git
The following commit(s) were added to refs/heads/v0.6 by this push:
new 09cedf6 [BACKPORT-0.6][BUGFIX] Fixed process termination routine in
windows (#5849)
09cedf6 is described below
commit 09cedf6847a81d53c09466cc9f1126f5d3b50fd9
Author: Yizhi Liu <[email protected]>
AuthorDate: Thu Jun 18 19:15:06 2020 -0700
[BACKPORT-0.6][BUGFIX] Fixed process termination routine in windows (#5849)
Co-authored-by: Seyyed Hossein Hasanpour <[email protected]>
Co-authored-by: Seyyed Hossein Hasanpour <[email protected]>
---
python/tvm/rpc/server.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/python/tvm/rpc/server.py b/python/tvm/rpc/server.py
index 9e03097..3fff530 100644
--- a/python/tvm/rpc/server.py
+++ b/python/tvm/rpc/server.py
@@ -402,7 +402,10 @@ class Server(object):
"""Terminate the server process"""
if self.use_popen:
if self.proc:
- os.killpg(self.proc.pid, signal.SIGTERM)
+ if platform.system() == "Windows":
+ os.kill(self.proc.pid, signal.CTRL_C_EVENT)
+ else:
+ os.killpg(self.proc.pid, signal.SIGTERM)
self.proc = None
else:
if self.proc: