STINNER Victor added the comment:

> @haypo, yeah, definitely better than mine! All good for me.

Ok. I added your name to Misc/ACKS. I had to do some tricks to apply the patch 
to Python 3.4 (code was in Python/pythonrun.c) and then to merge to Python 3.5 
(code moved to Python/pylifecycle.c). But I checked the fix in each version 
using gdb:

* put a breakpoint on create_stdio,
* type "print close(0)" after the first is_valid_fd() check,
* see that the open() exception is correctly handled (type "next", "next", ... 
and check that we go to the error: label and then enter the if() block)

Thanks for your patch Marco.

I prefer to be extra safe by checking the raised exception to minimize the risk 
of regression.

----------
resolution:  -> fixed
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24891>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to