[3.11]gh-127213: Replace os._exit() to sys.exit(), so that .so will alos be unloaded in child process#127246
[3.11]gh-127213: Replace os._exit() to sys.exit(), so that .so will alos be unloaded in child process#127246Yi-sir wants to merge 2 commits into
Conversation
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
I believe
|
But os._exit() will not unload .so in child process, which would cause some error. |
|
Sorry, 3.11 doesn't take bugfixes anymore. I'm closing this because trying to switch the target branch to main will be a headache, and we might accidentially trigger a codeowner review from half the core team (that tends to happen when switching the target branch). Please fix the issue for the main branch, and then open a new PR, we'll deal with backporting this to 3.13 and 3.12 automatically after it lands on main. |
#127213
As mentioned in this issue, a child process created by multiprocessing.Process() with method 'fork' works not the same as os.fork() or c fork() on unloading of .so files.
replace os._exit() to sys.exit() to fix it.