summaryrefslogtreecommitdiffstats
path: root/Python/frozenmain.c
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-11-27 11:19:02 (GMT)
committerGitHub <noreply@github.com>2022-11-27 11:19:02 (GMT)
commite4cfdaa45b5fe25ce27c63c9bed383a0f0d4abe9 (patch)
treeeb517c3f852c1d90524c3d1afa93c75f21b829d6 /Python/frozenmain.c
parent8bb7fdaee8c19f0311f15dbea7f8eee80a67a50f (diff)
downloadcpython-e4cfdaa45b5fe25ce27c63c9bed383a0f0d4abe9.zip
cpython-e4cfdaa45b5fe25ce27c63c9bed383a0f0d4abe9.tar.gz
cpython-e4cfdaa45b5fe25ce27c63c9bed383a0f0d4abe9.tar.bz2
GH-87235: Make sure "python /dev/fd/9 9</path/to/script.py" works on macOS (GH-99768)
On macOS all file descriptors for a particular file in /dev/fd share the same file offset, that is ``open("/dev/fd/9", "r")`` behaves more like ``dup(9)`` than a regular open. This causes problems when a user tries to run "/dev/fd/9" as a script because zipimport changes the file offset to try to read a zipfile directory. Therefore change zipimport to reset the file offset after trying to read the zipfile directory. (cherry picked from commit d08fb257698e3475d6f69bb808211d39e344e5b2) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Diffstat (limited to 'Python/frozenmain.c')
0 files changed, 0 insertions, 0 deletions