views:

42

answers:

2

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.

A: 

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.

Ned Batchelder
A: 

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.

Giovanni Bajo