cpython/Lib/multiprocessing
Gregory P. Smith c879b2a7a5
gh-141860: Add on_error= keyword arg to multiprocessing.set_forkserver_preload (GH-141859)
Add a keyword-only `on_error` parameter to `multiprocessing.set_forkserver_preload()`. This allows the user to have exceptions during optional `forkserver` start method module preloading cause the forkserver subprocess to warn (generally to stderr) or exit with an error (preventing use of the forkserver) instead of being silently ignored.

This _also_ fixes an oversight, errors when preloading a `__main__` module are now treated the similarly. Those would always raise unlike other modules in preload, but that had gone unnoticed as up until bug fix PR GH-135295 in 3.14.1 and 3.13.8, the `__main__` module was never actually preloaded.

Based on original work by Nick Neumann @aggieNick02 in GH-99515.
2026-01-18 14:04:18 -08:00
..
dummy gh-138813: Fix mutable default kwargs={} in multiprocessing BaseProcess and DummyProcess to use None (GH-138814) 2025-09-17 14:45:52 -07:00
__init__.py Simplify __all__ in multiprocessing (GH-6856) 2018-07-11 19:22:28 +09:00
connection.py Fix pyflakes warnings: variable is assigned to but never used (#142294) 2025-12-08 14:00:31 +01:00
context.py gh-141860: Add on_error= keyword arg to multiprocessing.set_forkserver_preload (GH-141859) 2026-01-18 14:04:18 -08:00
forkserver.py gh-141860: Add on_error= keyword arg to multiprocessing.set_forkserver_preload (GH-141859) 2026-01-18 14:04:18 -08:00
heap.py gh-137928: remove redundant size validation in multiprocessing.heap (GH-137929) 2025-11-12 00:36:43 +00:00
managers.py gh-115942: Add locked to several multiprocessing locks (#115944) 2025-04-08 11:14:12 +03:00
pool.py gh-109649: Use os.process_cpu_count() (#110165) 2023-10-01 03:14:57 +02:00
popen_fork.py gh-131913: multiprocessing: add interrupt for POSIX (GH-132453) 2025-04-22 23:55:24 -07:00
popen_forkserver.py bpo-36888: Add multiprocessing.parent_process() (GH-13247) 2019-05-20 21:37:05 +02:00
popen_spawn_posix.py gh-118981: multiprocessing.popen_spawn_posix, fix potential hang (gh-118982) 2025-09-07 07:18:28 +00:00
popen_spawn_win32.py gh-118293: Suppress mouse cursor feedback when launching Windows processes with multiprocessing (GH-118315) 2024-04-28 21:10:44 +00:00
process.py gh-138813: Fix mutable default kwargs={} in multiprocessing BaseProcess and DummyProcess to use None (GH-138814) 2025-09-17 14:45:52 -07:00
queues.py gh-133146: Add the old public get_value method to documentation and refactor code. (GH-133301) 2025-11-29 22:12:48 +00:00
reduction.py gh-97514: Authenticate the forkserver control socket. (GH-99309) 2024-11-20 08:18:58 -08:00
resource_sharer.py gh-101225: Increase the socket backlog when creating a multiprocessing.connection.Listener (#113567) 2024-01-13 10:48:33 +01:00
resource_tracker.py gh-142206: multiprocessing.resource_tracker: Decode messages using older protocol (GH-142215) 2025-12-03 12:59:14 +00:00
shared_memory.py gh-121288: Make error message for index() methods consistent (GH-121395) 2024-07-05 10:50:45 -07:00
sharedctypes.py gh-133017: Improve error message for invalid typecodes in multiprocessing.{Array,Value} (GH-133252) 2025-05-09 11:46:45 +03:00
spawn.py gh-109263: Start process from spawn context in multiprocessing no longer have side effect (GH-135813) 2025-12-23 19:28:32 +00:00
synchronize.py gh-133146: Add the old public get_value method to documentation and refactor code. (GH-133301) 2025-11-29 22:12:48 +00:00
util.py gh-140734: fix off-by-one error when comparing to _SUN_PATH_MAX (#140903) 2025-11-07 09:54:02 +00:00