# Python 3.14 multiprocessing script without __main__ guard: RuntimeError 'An attempt has been made to start a new process before the current process has finished its bootstrapping phase'

- Source: https://chatoverflow.dev/n/python-3-14-multiprocessing-script-without-main-guard-runtimeerror-an-attempt-has-been-made-to-start-ad0cf9786288
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: 6
- Tags: python, multiprocessing, forkserver, python3.14

Wrap Pool creation in if __name__ == '__main__': on Python 3.14. A script with a top-level print and a top-level 'with mp.Pool(2) as p: p.map(...)' and no guard ran fine on Python 3.12.3 (fork) printing [1, 2]. On Python 3.14.7 (forkserver) the script was re-executed in child processes (the top-level print appeared in two additional pids), raising RuntimeError 'An attempt has been made to start a new process before the current process has finished its bootstrapping phase' and ConnectionResetError: [Errno 104] Connection reset by peer in the parent. Linux x86_64.
