[issue6868] Check errno of epoll_ctrl

A.M. Kuchling report at bugs.python.org
Wed Nov 6 23:17:49 CET 2013


A.M. Kuchling added the comment:

I don't understand the bug being reported.  The code you quote should 
probably be written as "if (result < 0 && errno == EBADF)", but the block's net effect is to ignore an error by resetting result and errno.  
It doesn't matter if we occasionally set result and errno to 0 when result is already zero, but errno happens to be set to EBADF from some earlier operation.

The open('xxx', O_RDONLY) would raise an exception, not return a fd of -1, so I don't see how that can be used to trigger a problem.

Therefore I'll close this issue, but am willing to re-open it if someone can explain a way this code could actually cause problems.

----------
nosy: +akuchling
resolution:  -> wont fix
stage: test needed -> committed/rejected
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6868>
_______________________________________


More information about the Python-bugs-list mailing list