未验证 提交 f3e5c093 编写于 作者: P Peifeng Qiu 提交者: GitHub

gpload: exit with os._exit to prevent hang (#5335)

gpload test case will run gpload with subprocess, read stdout
and stderr from it and wait for exit. sys.exit in gpload does some
cleanup may cause deadlock between test and gpload. os._exit will
exit immediately, but we need to flush stdout and stderr before
that.
上级 6d629f7a
......@@ -2898,4 +2898,6 @@ class gpload:
if __name__ == '__main__':
g = gpload(sys.argv[1:])
g.run()
sys.exit(g.exitValue)
sys.stdout.flush()
sys.stderr.flush()
os._exit(g.exitValue)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册