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 anacrolix, doko, exarkun, lekma, loewis, neologix, nvetoshkin, pitrou, socketpair, vstinner
Date 2013-01-18.13:56:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1358517383.94.0.805737457536.issue10115@psf.upfronthosting.co.za>
In-reply-to
Content
My implementation of the PEP 433 uses accept4() for socket.accept() if the (new) cloexec parameter is True:
http://hg.python.org/features/pep-433/file/46b7a077ae87/Modules/socketmodule.c#l1961

The code fallbacks to accept() if accept4() fails with ENOSYS. It happens if the glibc version is 2.10 or newer, whereas the Linux kernel is older than 2.6.28. I didn't test the fallback yet.

I see in changeset 12442ac3f7dd (issue #7523) that SOCK_NONBLOCK is also set in the flags parameters of accept4(). I should probably also do that.
History
Date User Action Args
2013-01-18 13:56:24vstinnersetrecipients: + vstinner, loewis, doko, exarkun, pitrou, lekma, anacrolix, nvetoshkin, neologix, socketpair
2013-01-18 13:56:23vstinnersetmessageid: <1358517383.94.0.805737457536.issue10115@psf.upfronthosting.co.za>
2013-01-18 13:56:23vstinnerlinkissue10115 messages
2013-01-18 13:56:23vstinnercreate