This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ronaldoussoren
Recipients gregory.p.smith, pablogsal, ronaldoussoren, serhiy.storchaka, vstinner
Date 2018-09-18.19:57:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1537300644.57.0.956365154283.issue34663@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2018-09-18 19:57:24ronaldoussorensetrecipients: + ronaldoussoren, gregory.p.smith, vstinner, serhiy.storchaka, pablogsal
2018-09-18 19:57:24ronaldoussorensetmessageid: <1537300644.57.0.956365154283.issue34663@psf.upfronthosting.co.za>
2018-09-18 19:57:24ronaldoussorenlinkissue34663 messages
2018-09-18 19:57:24ronaldoussorencreate