开发者

pyinstaller exe's not dying after sys.exit()

开发者 https://www.devze.com 2022-12-18 04:24 出处:网络
I have a cherrypy app compiled开发者_运维技巧 with pyinstaller. One function does the following:

I have a cherrypy app compiled开发者_运维技巧 with pyinstaller. One function does the following:

cherrypy.engine.stop()
sys.exit()

the cherrypy engine stops without problem, but the process doesn't actually die and I can't figure out why.


Try with os._exit(), which is a real system exit. I can't see why PyInstaller should change a thing when it comes to process quitting, though.


One thing to keep in mind: sys.exit() doesn't actually kill the process: it raises SystemExit, which usually results in the process ending, but doesn't have to.

0

精彩评论

暂无评论...
验证码 换一张
取 消