[Python-checkins] r85796 - python/branches/py3k/Modules/socketmodule.c
antoine.pitrou
python-checkins at python.org
Fri Oct 22 20:44:15 CEST 2010
Author: antoine.pitrou
Date: Fri Oct 22 20:44:15 2010
New Revision: 85796
Log:
For now, remove accept4() code (issue #10115)
Modified:
python/branches/py3k/Modules/socketmodule.c
Modified: python/branches/py3k/Modules/socketmodule.c
==============================================================================
--- python/branches/py3k/Modules/socketmodule.c (original)
+++ python/branches/py3k/Modules/socketmodule.c Fri Oct 22 20:44:15 2010
@@ -1676,9 +1676,6 @@
PyObject *addr = NULL;
PyObject *res = NULL;
int timeout;
-#ifdef HAVE_ACCEPT4
- int flags = 0;
-#endif
if (!getsockaddrlen(s, &addrlen))
return NULL;
memset(&addrbuf, 0, addrlen);
@@ -1690,13 +1687,7 @@
Py_BEGIN_ALLOW_THREADS
timeout = internal_select_ex(s, 0, interval);
if (!timeout) {
-#ifdef HAVE_ACCEPT4
- /* inherit socket flags and use accept4 call */
- flags = s->sock_type & (SOCK_CLOEXEC | SOCK_NONBLOCK);
- newfd = accept4(s->sock_fd, SAS2SA(&addrbuf), &addrlen, flags);
-#else
newfd = accept(s->sock_fd, SAS2SA(&addrbuf), &addrlen);
-#endif /* HAVE_ACCEPT4 */
}
Py_END_ALLOW_THREADS
More information about the Python-checkins
mailing list