A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-February/060724.html below:

[Python-Dev] Pervasive socket failures on Windows

[Python-Dev] Pervasive socket failures on Windows [Python-Dev] Pervasive socket failures on Windows"Martin v. Löwis" martin at v.loewis.de
Fri Feb 10 22:33:28 CET 2006
Tim Peters wrote:
> I suggest skipping the new crud conditionalized on a symbol like
> 
>     Py_SOCKET_FD_CAN_BE_GE_FD_SETSIZE
> 

Hmm... How about this patch:

Index: Modules/socketmodule.c
===================================================================
--- Modules/socketmodule.c      (Revision 42308)
+++ Modules/socketmodule.c      (Arbeitskopie)
@@ -396,7 +396,14 @@
 static PyTypeObject sock_type;

 /* Can we call select() with this socket without a buffer overrun? */
+#ifdef MS_WINDOWS
+/* Everything is selectable on Windows */
+#define IS_SELECTABLE(s)  1
+#else
+/* POSIX says selecting descriptors above FD_SETSIZE is undefined
+   behaviour. */
 #define IS_SELECTABLE(s) ((s)->sock_fd < FD_SETSIZE)
+#endif

 static PyObject*
 select_error(void)

Regards,
Martin
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4