pyinstaller exe's not dying after sys.exit()
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.
精彩评论