Message249775
| Author |
vstinner |
| Recipients |
Yi Ding, mpaolini, ned.deily, python-dev, rbcollins, ronaldoussoren, vstinner |
| Date |
2015年09月04日.15:35:10 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1441380910.89.0.0577303541705.issue24891@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> @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. |
|