Message118471
| Author |
nvetoshkin |
| Recipients |
BreamoreBoy, exarkun, lekma, nvetoshkin, pitrou, r.david.murray |
| Date |
2010年10月12日.20:49:11 |
| SpamBayes Score |
0.000137964 |
| Marked as misclassified |
No |
| Message-id |
<1286916554.53.0.857842921194.issue7523@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Thanks! I can see the problem now, but I think checking should be done like this:
>>> fcntl.fcntl(c, fcntl.F_GETFD) & fcntl.FD_CLOEXEC
0
>>> fcntl.fcntl(s, fcntl.F_GETFD) & fcntl.FD_CLOEXEC
1
and with accept4() call I've got flag set:
>>> fcntl.fcntl(c, fcntl.F_GETFD) & fcntl.FD_CLOEXEC
1
>>> fcntl.fcntl(s, fcntl.F_GETFD) & fcntl.FD_CLOEXEC
1
Don't know how to properly check if accept4 is available.
Second attempt - dropping flags from sock_type should be done on Python level in socket.py and I don't quite like idea to check if SOCK_CLOEXEC is in locals every time. |
|