Alexey Izbyshev <izbys...@ispras.ru> added the comment:
> Until muscl decides to provide an "#ifdef __MUSL__"-like or any way that it's > musl, I propose to not support musl: don't use os.posix_spawn() but > _posixsubprocess. FYI, I'm researching how to use vfork(), focusing on Linux, but I'll need more time to study the current state of affairs of libcs. Both musl and glibc don't use "pure" vfork() now because of perceived danger of miscompilation due to sharing of the stack between the parent and the child. They switched to clone(CLONE_VM|CLONE_VFORK), which is basically the same but allows the caller to provide a separate stack for the child. There are also additional subtle issues related to signal handling (and pthread cancellation in particular) which I need to study. If I find vfork()-like approach feasible, I'll open a separate issue. The bonus of this approach is that it doesn't depend on a particular libc, so both glibc (including older versions) and musl could be supported. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35537> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com