Python Process won't call atexit

跟風遠走 提交于 2019-11-29 13:23:05

As the docs say,

On Unix this is done using the SIGTERM signal; on Windows TerminateProcess() is used. Note that exit handlers and finally clauses, etc., will not be executed.

If you're on Unix, you should be able intercept SIGTERM with signal, and perform whatever "termination activities" you need; however, I don't know of a cross-platform solution.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!