[issue43069] Python fails to read a script whose path is `/dev/fd/X`
Alexey Izbyshev
report at bugs.python.org
Sat Jan 30 07:21:41 EST 2021
Alexey Izbyshev <izbyshev at ispras.ru> added the comment:
I would suggest to start digging from the following piece of code in `maybe_pyc_file()` (Python/pythonrun.c):
int ispyc = 0;
if (ftell(fp) == 0) {
if (fread(buf, 1, 2, fp) == 2 &&
((unsigned int)buf[1]<<8 | buf[0]) == halfmagic)
ispyc = 1;
rewind(fp);
}
----------
nosy: +izbyshev
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43069>
_______________________________________
More information about the Python-bugs-list
mailing list