]> granicus.if.org Git - python/commitdiff
For now, remove accept4() code (issue #10115)
authorAntoine Pitrou <solipsis@pitrou.net>
Fri, 22 Oct 2010 18:44:15 +0000 (18:44 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Fri, 22 Oct 2010 18:44:15 +0000 (18:44 +0000)
Modules/socketmodule.c

index d0e1ed6657b124d0e79bd5397c4fcd3f35f4b931..d340f94be3704a2d7704e72f21ba4720b7e9d3a2 100644 (file)
@@ -1676,9 +1676,6 @@ sock_accept(PySocketSockObject *s)
     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 @@ sock_accept(PySocketSockObject *s)
     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