[issue10115] accept4 can fail with errno 90

2010-10-17 Thread Antoine Pitrou
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;

[issue10115] accept4 can fail with errno 90

2010-10-17 Thread Vetoshkin Nikita
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

[issue10115] accept4 can fail with errno 90

2010-10-17 Thread Martin v . Löwis
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

[issue10115] accept4 can fail with errno 90

2010-10-16 Thread Antoine Pitrou
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

[issue10115] accept4 can fail with errno 90

2010-10-16 Thread Vetoshkin Nikita
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:

[issue10115] accept4 can fail with errno 90

2010-10-15 Thread Antoine Pitrou
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

[issue10115] accept4 can fail with errno 90

2010-10-15 Thread Antoine Pitrou
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

[issue10115] accept4 can fail with errno 90

2010-10-15 Thread Vetoshkin Nikita
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

[issue10115] accept4 can fail with errno 90

2010-10-15 Thread Antoine Pitrou
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. --

[issue10115] accept4 can fail with errno 90

2010-10-15 Thread Antoine Pitrou
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 ___

[issue10115] accept4 can fail with errno 90

2010-10-15 Thread Vetoshkin Nikita
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 ___

[issue10115] accept4 can fail with errno 90

2010-10-15 Thread Antoine Pitrou
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

[issue10115] accept4 can fail with errno 90

2010-10-15 Thread Vetoshkin Nikita
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 --

[issue10115] accept4 can fail with errno 90

2010-10-15 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +exarkun ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10115 ___ ___ Python-bugs-list mailing