[issue34663] Support POSIX_SPAWN_USEVFORK flag in posix_spawn

STINNER Victor report at bugs.python.org
Sat Sep 15 05:10:09 EDT 2018


STINNER Victor <vstinner at redhat.com> added the comment:

Gregory: on Linux, it does change the behavior. The parent blocks until the child is spawned. Python should let the developer decide to opt-in.

Serhiy: IMHO it's better to make posix_spawn() as dumb as possible, a simple wrapper to the C call. use_vfork=True is currently designed for the GNU constant.

posix_spawn(use_vfork=True) raises on FreeBSD: only pass use_vfork=True on Linux.

What do you think?

The problem of changing the default is that we don't know the full list of all platforms that use vfork() by default. If we have a shoet list, how do we know if it's complete? For example, macOS doesn't say anything about vfork. Does it use it? Maybe not. Maybe yes. What if the default changes on a platform?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34663>
_______________________________________


More information about the Python-bugs-list mailing list