This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ronaldoussoren
Recipients ciprian.craciun, ned.deily, ronaldoussoren
Date 2021-01-30.10:09:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I can reproduce the issue on macOS 11.1. 

As you write:
- running /dev/fd/X as a script fails silently if it refers to an smallish file
- reading /dev/fd/X referring to the same smallish files works fine (the ``open('/dev/fd/9').read()`` scenario. 

If I read the code in Modules/main.c correctly the main difference between the two scenario's is that the first scenario using the C stdio library to read the file (in pymain_run_file_obj), and the latter uses the normal Python io stack.

Reading /dev/fd/9 works fine when using either stdio or open/read in C code. 

I have not yet tried to untangle the layers of C code from pymain_run_file_obj to actually reading the script, there might be something there that sheds light on what's going on here.

I'm not yet willing to claim this is an OS bug as I've failed to reproduce this outside of Python.
Date User Action Args
2021-01-30 10:09:55ronaldoussorensetrecipients: + ronaldoussoren, ned.deily, ciprian.craciun
2021-01-30 10:09:55ronaldoussorensetmessageid: <>
2021-01-30 10:09:55ronaldoussorenlinkissue43069 messages
2021-01-30 10:09:55ronaldoussorencreate