Ronald Oussoren <ronaldousso...@mac.com> added the comment:

I did some more research:

* <https://sourceware.org/bugzilla/show_bug.cgi?id=10354> seems to indicate 
that glibc switched to a different implementation of posix_spawn that uses 
clone(2) instead of fork()/vfork() to avoid some problems with vfork(). 

The start of the issue also contains some information on why glibc is (was?) so 
conservative about using vfork, and a possible work around (disable cancelation 
points around the call to posix_spawn).

* 
<https://github.com/lattera/glibc/blob/master/sysdeps/unix/sysv/linux/spawni.c> 
is the source for the guts of posix_spawn for some version of glibc, and that 
indeed does use clone(...|CLONE_VFORK...) unconditionally and does not appear 
to test for POSIX_SPAWN_USEVFORK. 



It looks like the advise to use POSIX_SPAWN_USEVFORK is outdated, although I'm 
not 100% sure of my conclusion.  A glibc expert should be able to confirm or 
refute this. 

@pablogsal: do you have more information on why you want to enable this flag? 
Do you have measurements that show that adding this flag helps?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34663>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to