[issue42569] Callers of _Py_fopen/_Py_wfopen may be broken after addition of audit hooks

Alexey Izbyshev report at bugs.python.org
Fri Dec 4 12:13:47 EST 2020


Alexey Izbyshev <izbyshev at ispras.ru> added the comment:

> To implement PEP 446: create non-inheritable file descriptors.

Yes, I understand that was the original role. But currently there is no easy way to deal with errors from the helpers because of exception vs. errno conundrum. Maybe they should be split to two functions each (one that always reports errors via an exception, and the other is a low-level one)? Or, alternatively, keep only exception-reporting variants but check all callers so that they don't use errno and call them from the right context (with GIL, etc.)?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42569>
_______________________________________


More information about the Python-bugs-list mailing list