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 vstinner
Recipients gregory.p.smith, neologix, pitrou, sstewartgallus, vstinner
Date 2014-06-02.12:36:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1401712562.81.0.479470107567.issue21627@psf.upfronthosting.co.za>
In-reply-to
Content
I have no opinon on close() vs setting CLOEXEC flag, but you should use _Py_set_inheritable(fd, 0, NULL). _Py_set_inheritable() is able to set the CLOEXEC flag in a single syscall, instead of 2 syscalls. _close_fds_by_brute_force() is already very slow when the maximum file descriptor is large:
http://legacy.python.org/dev/peps/pep-0446/#closing-all-open-file-descriptors
History
Date User Action Args
2014-06-02 12:36:02vstinnersetrecipients: + vstinner, gregory.p.smith, pitrou, neologix, sstewartgallus
2014-06-02 12:36:02vstinnersetmessageid: <1401712562.81.0.479470107567.issue21627@psf.upfronthosting.co.za>
2014-06-02 12:36:02vstinnerlinkissue21627 messages
2014-06-02 12:36:02vstinnercreate