[New-bugs-announce] [issue46367] multiprocessing's "spawn" doesn't actually use spawn
report at bugs.python.org
Thu Jan 13 14:20:59 EST 2022
New submission from jakirkham <jakirkham at gmail.com>:
Reporting an issue recently encountered by a colleague.
It appears the `multiprocessing`'s "spawn" mode doesn't actually use POSIX spawn, but instead uses fork+exec. While this is certainly a useful feature in its own right, this not quite one would expect from something described as spawn. AFAICT the documentation doesn't point this out.
This is important as some libraries are not fork-safe and even fork+exec is not sufficient to protect them. Would be helpful if "spawn" did use POSIX spawn and the current behavior was covered under a clearer name (like "forkexec").
components: Library (Lib)
title: multiprocessing's "spawn" doesn't actually use spawn
versions: Python 3.10, Python 3.11, Python 3.7, Python 3.8, Python 3.9
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce