Author jakirkham
Recipients jakirkham
Date 2022-01-13.19:20:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1642101659.38.0.387431242507.issue46367@roundup.psfhosted.org>
In-reply-to
Content
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[1]. 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").


Ref:
1. https://github.com/python/cpython/blob/af6b4068859a5d0c8afd696f3c0c0155660211a4/Lib/multiprocessing/util.py#L448-L458
History
Date User Action Args
2022-01-13 19:20:59jakirkhamsetrecipients: + jakirkham
2022-01-13 19:20:59jakirkhamsetmessageid: <1642101659.38.0.387431242507.issue46367@roundup.psfhosted.org>
2022-01-13 19:20:59jakirkhamlinkissue46367 messages
2022-01-13 19:20:59jakirkhamcreate