[issue10115] accept4 can fail with errno 90

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

[issue10115] accept4 can fail with errno 90

2010-10-17 Thread Vetoshkin Nikita
Vetoshkin Nikita 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 whether we should inher

[issue10115] accept4 can fail with errno 90

2010-10-17 Thread Antoine Pitrou
Antoine Pitrou 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; +#ifdef HAVE_ACCEP

[issue10115] accept4 can fail with errno 90

2010-10-16 Thread Vetoshkin Nikita
Vetoshkin Nikita 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: http://bugs.python.org/file19253/

[issue10115] accept4 can fail with errno 90

2010-10-16 Thread Antoine Pitrou
Antoine Pitrou 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-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +exarkun ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue10115] accept4 can fail with errno 90

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

[issue10115] accept4 can fail with errno 90

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

[issue10115] accept4 can fail with errno 90

2010-10-15 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: What about exposing accept4() to python level? -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue10115] accept4 can fail with errno 90

2010-10-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, 90 is ENOSYS on that buildbot :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue10115] accept4 can fail with errno 90

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

[issue10115] accept4 can fail with errno 90

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

[issue10115] accept4 can fail with errno 90

2010-10-15 Thread Antoine Pitrou
New submission from Antoine Pitrou : 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 525, in _boots