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 <rep...@bugs.python.org>
<http://bugs.python.org/issue6868>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to