Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/362.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python pyinstaller exe';s在sys.exit()之后不会死亡_Python_Pyinstaller - Fatal编程技术网

Python pyinstaller exe';s在sys.exit()之后不会死亡

Python pyinstaller exe';s在sys.exit()之后不会死亡,python,pyinstaller,Python,Pyinstaller,我有一个用pyinstaller编译的cherrypy应用程序。一个函数执行以下操作: cherrypy.engine.stop() sys.exit() cherrypy引擎没有问题地停止了,但这个过程实际上并没有消亡,我也不知道为什么 要记住一件事:sys.exit()实际上并不会终止进程:它会引发SystemExit,这通常会导致进程结束,但并不一定要结束。尝试操作系统。_exit(),这是一个真正的系统出口。不过,我不明白为什么PyInstaller在进程退出时要改变一件事

我有一个用pyinstaller编译的cherrypy应用程序。一个函数执行以下操作:

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

cherrypy引擎没有问题地停止了,但这个过程实际上并没有消亡,我也不知道为什么

要记住一件事:sys.exit()实际上并不会终止进程:它会引发SystemExit,这通常会导致进程结束,但并不一定要结束。

尝试操作系统。_exit(),这是一个真正的系统出口。不过,我不明白为什么PyInstaller在进程退出时要改变一件事