homepage

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 neologix
Recipients doko, exarkun, lekma, loewis, neologix, nvetoshkin, pitrou, socketpair, vstinner
Date 2011年06月06日.18:56:30
SpamBayes Score 0.0012422947
Marked as misclassified No
Message-id <1307386591.21.0.0864111372081.issue10115@psf.upfronthosting.co.za>
In-reply-to
Content
@nvetoshkin
Could you update your patch against py3k?
I've got a couple comments (can't login to Rietveld, it's probably due to the change of my tracker account name):
if(flags & ~(SOCK_NONBLOCK | SOCK_CLOEXEC)) {
 PyErr_SetString(PyExc_ValueError,
 "Wrong flag value");
 return NULL;
}
I'm not sure that's necessary:
- accept4() can sanitize its input itself if necessary (will fail with EINVAL)
- if some flag is added, or another OS doesn't use the same flags, it'll fall out of sync
#ifdef HAVE_ACCEPT4
 /* These flags are not inherited after accept */
 type &= ~(SOCK_NONBLOCK & SOCK_CLOEXEC);
#endif /* HAVE_ACCEPT4 */
SOCK_NONBLOCK & SOCK_CLOEXEC == 0, so this doesn't do much.
Second, you should probably reuse what's done in Lib/socket.py for timeout inheritance upon accept (except that here you certainly don't want to set the socket to blocking if SOCK_NONBLOCK flag is passed).
You should add a test for that: have a look at test_pipe2 in Lib/test/test_posix.py.
History
Date User Action Args
2011年06月06日 18:56:31neologixsetrecipients: + neologix, loewis, doko, exarkun, pitrou, vstinner, lekma, nvetoshkin, socketpair
2011年06月06日 18:56:31neologixsetmessageid: <1307386591.21.0.0864111372081.issue10115@psf.upfronthosting.co.za>
2011年06月06日 18:56:30neologixlinkissue10115 messages
2011年06月06日 18:56:30neologixcreate

AltStyle によって変換されたページ (->オリジナル) /