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 judas.iscariote
Recipients eryksun, gregory.p.smith, izbyshev, judas.iscariote, lemburg, richardxia, vstinner
Date 2021-12-17.13:55:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1639749331.52.0.295309567675.issue42738@roundup.psfhosted.org>
In-reply-to
Content
My 2 CLP.
On linux/glibc you do not have to do this, there is a posix_spawn_file_actions_addclosefrom_np action which is implemented using  close_range(2) which will give you the fastest way to this job without hassle.

for the not posix_spawn case, interate over /proc/self/fd and set the CLOEXEC flag using fcntl.. if close_Range is not available or returns returns different than 0
History
Date User Action Args
2021-12-17 13:55:31judas.iscariotesetrecipients: + judas.iscariote, lemburg, gregory.p.smith, vstinner, eryksun, izbyshev, richardxia
2021-12-17 13:55:31judas.iscariotesetmessageid: <1639749331.52.0.295309567675.issue42738@roundup.psfhosted.org>
2021-12-17 13:55:31judas.iscariotelinkissue42738 messages
2021-12-17 13:55:31judas.iscariotecreate