gh-143706: Fix sys.argv not set during multiprocessing forkserver __main__ preload#143717
Conversation
…er `__main__` preload The forkserver was not passing sys.argv to its main() function, causing sys.argv to be empty during `__main__` module import in child processes. This fixes a non-obvious regression inadvertently introduced by the pythongh-126631 main preloading fix.
|
🤖 New build scheduled with the buildbot fleet by @gpshead for commit 30b347f 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F143717%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
|
Thanks @gpshead for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
|
Sorry, @gpshead, I could not cleanly backport this to |
|
GH-143763 is a backport of this pull request to the 3.14 branch. |
…er `__main__` preload (pythonGH-143717) The forkserver was not passing sys.argv to its main() function, causing sys.argv to be empty during `__main__` module import in child processes. This fixes a non-obvious regression inadvertently introduced by the pythongh-126631 main preloading fix. (cherry picked from commit 298d544) Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
…ver `__main__` preload (GH-143717) (#143763) gh-143706: Fix sys.argv not set during multiprocessing forkserver `__main__` preload (GH-143717) The forkserver was not passing sys.argv to its main() function, causing sys.argv to be empty during `__main__` module import in child processes. This fixes a non-obvious regression inadvertently introduced by the gh-126631 main preloading fix. (cherry picked from commit 298d544) Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
|
|
…orkserver `__main__` preload (pythonGH-143717) The forkserver was not passing sys.argv to its main() function, causing sys.argv to be empty during `__main__` module import in child processes. This fixes a non-obvious regression inadvertently introduced by the pythongh-126631 main preloading fix. (cherry picked from commit 298d544)
|
GH-143821 is a backport of this pull request to the 3.13 branch. |
…ver `__main__` preload (GH-143717) (#143821) The forkserver was not passing sys.argv to its main() function, causing sys.argv to be empty during `__main__` module import in child processes. This fixes a non-obvious regression inadvertently introduced by the gh-126631 main preloading fix. (cherry picked from commit 298d544)
|
The forkserver was not passing sys.argv to its main() function, causing sys.argv to be empty during
__main__module import in child processes. This fixes a non-obvious regression inadvertently introduced by the gh-126631 main preloading fix.@duaneg FYI
sys.argvno longer correct during main module execution usingforkserver#143706