Antoine Pitrou pit...@free.fr added the comment:
There would need to be some tests.
Also, this last part of the patch looks strange:
@@ -3001,6 +3072,10 @@
PyErr_SetString(PyExc_ValueError,
can't use invalid socket value);
return -1;
Vetoshkin Nikita nikita.vetosh...@gmail.com added the comment:
What is it meant for? And why does it come right after a return statement?
@Antoine, if fd was supplied and it was correct (not returned with -1), let's
drop flags that can't be inherited.
It's a mistake, at that level we don't know
Martin v. Löwis mar...@v.loewis.de added the comment:
That's another possibility, in which case we would first remove the
current accept4-calling code in order to fix the buildbot failure.
In Python, the lowest layer facing the operating system always directly
exposes the API as-is, without
Antoine Pitrou pit...@free.fr added the comment:
Weekend is coming, so I can lend a hand in implementing whatever you
choose.
I don't have any strong opinion about it, so it's whichever you prefer really :)
--
___
Python tracker
Vetoshkin Nikita nikita.vetosh...@gmail.com added the comment:
Made a proof of concept patch (no doc updates yet). Decided to implement
separate accept4() method, cause we have already spent enough time dealing with
it and rollback would be pity.
--
keywords: +patch
Added file:
New submission from Antoine Pitrou pit...@free.fr:
When a machine has a newer glibc and an old kernel, accept4 can fail and then
Python accept() is unusable. For example:
Traceback (most recent call last):
File
/home/pybot/buildarea-sid/3.x.klose-debian-sparc/build/Lib/threading.py, line
Antoine Pitrou pit...@free.fr added the comment:
Or perhaps we should back out the accept4 change and live with the fact that
SOCK_CLOEXEC and SOCK_NONBLOCK can't be inherited by calling accept().
--
___
Python tracker rep...@bugs.python.org
Vetoshkin Nikita nikita.vetosh...@gmail.com added the comment:
Falling back on result 90 is not that difficult, I think I can submit a patch
today. What should be checked ENOSYS or 90?
--
___
Python tracker rep...@bugs.python.org
Antoine Pitrou pit...@free.fr added the comment:
Falling back on result 90 is not that difficult, I think I can submit
a patch today. What should be checked ENOSYS or 90?
That's a rather good question. I will enable some debug printout on the
buildbot.
--
Antoine Pitrou pit...@free.fr added the comment:
Ok, 90 is ENOSYS on that buildbot :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10115
___
Vetoshkin Nikita nikita.vetosh...@gmail.com added the comment:
What about exposing accept4() to python level?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10115
___
Antoine Pitrou pit...@free.fr added the comment:
What about exposing accept4() to python level?
That's another possibility, in which case we would first remove the current
accept4-calling code in order to fix the buildbot failure.
--
nosy: +loewis
Vetoshkin Nikita nikita.vetosh...@gmail.com added the comment:
Weekend is coming, so I can lend a hand in implementing whatever you choose.
Summary:
* remove accept4() as default and expose it as separate method
* add runtime fallback if accept4() returns ENOSYS
--
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +exarkun
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10115
___
___
Python-bugs-list mailing
14 matches
Mail list logo