]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-143706: Fix sys.argv not set during multiprocessing forkserver `__main__` preload...
authorGregory P. Smith <68491+gpshead@users.noreply.github.com>
Mon, 12 Jan 2026 23:47:21 +0000 (15:47 -0800)
committerGitHub <noreply@github.com>
Mon, 12 Jan 2026 23:47:21 +0000 (15:47 -0800)
commit298d5440eb83f2dfd5651bac86d1592ec358d54c
tree28ad80b94588f5cff98d9c4982a6542edb2a5f7e
parentd5882c5b7057b1b0a9dfd7b797a44d27e12d7ad3
gh-143706: Fix sys.argv not set during multiprocessing forkserver `__main__` preload (#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.
Lib/multiprocessing/forkserver.py
Lib/test/_test_multiprocessing.py
Lib/test/mp_preload_sysargv.py [new file with mode: 0644]
Misc/NEWS.d/next/Library/2026-01-12-07-17-38.gh-issue-143706.sysArgv.rst [new file with mode: 0644]