mirror of
https://github.com/python/cpython.git
synced 2025-08-26 19:55:24 +00:00
gh-83856: Honor atexit for all multiprocessing start methods (GH-114279)
Use atexit for all multiprocessing start methods to cleanup. See the GH-114279 PR discussion and related issue for details as to why.
This commit is contained in:
parent
cb57a52a85
commit
998c3856c1
5 changed files with 34 additions and 5 deletions
|
@ -310,11 +310,8 @@ class BaseProcess(object):
|
|||
# _run_after_forkers() is executed
|
||||
del old_process
|
||||
util.info('child process calling self.run()')
|
||||
try:
|
||||
self.run()
|
||||
exitcode = 0
|
||||
finally:
|
||||
util._exit_function()
|
||||
self.run()
|
||||
exitcode = 0
|
||||
except SystemExit as e:
|
||||
if e.code is None:
|
||||
exitcode = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue