[issue6397] Implementing Solaris "/dev/poll" in the "select" module
Jesús Cea Avión
report at bugs.python.org
Mon Nov 14 13:46:42 CET 2011
Jesús Cea Avión <jcea at jcea.es> added the comment:
New changeset. The only change is:
"""
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -685,8 +685,16 @@
return -1;
}
if (n < size) {
- PyErr_SetString(PyExc_IOError, "failed to write all pollfds. "
- "Please, report in http://bugs.python.org/");
+ /*
+ ** Data writed to /dev/poll is a binary data structure. It is not
+ ** clear what to do if a partial write occurred. For now, raise
+ ** an exception and see if we actually found this problem in
+ ** the wild.
+ */
+ PyErr_Format(PyExc_IOError, "failed to write all pollfds. "
+ "Please, report at http://bugs.python.org/. "
+ "Data to report: Size tried: %d, actual size written: %d",
+ size, n);
return -1;
}
return 0;
"""
If there are no disagreements, I will commit to default (3.3) soon (in a few hours/a day).
Thanks!.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6397>
_______________________________________
More information about the Python-bugs-list
mailing list