]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-26228: Fix pty EOF handling (GH-12049) (GH-27732)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 12 Aug 2021 12:36:04 +0000 (05:36 -0700)
committerGitHub <noreply@github.com>
Thu, 12 Aug 2021 12:36:04 +0000 (14:36 +0200)
commit5d444434ad4e1943a88c9d3aadd300fd0f05dab7
treed287cc76adc529e32987d5d244fe55e0eb8fdded
parent2666d702e49aa0e4975553bec2e92ca4a2dba4ea
bpo-26228: Fix pty EOF handling (GH-12049) (GH-27732)

On non-Linux POSIX platforms, like FreeBSD or macOS,
the FD used to read a forked PTY may signal its exit not
by raising an error but by sending empty data to the read
syscall. This case wasn't handled, leading to hanging
`pty.spawn` calls.

Co-authored-by: Reilly Tucker Siemens <reilly@tuckersiemens.com>
Co-authored-by: Ɓukasz Langa <lukasz@langa.pl>
(cherry picked from commit 81ab8db235580317edcb0e559cd4c983f70883f5)

Co-authored-by: Zephyr Shannon <geoffpshannon@gmail.com>
Doc/library/pty.rst
Lib/pty.py
Lib/test/test_pty.py
Misc/ACKS
Misc/NEWS.d/next/Library/2019-02-26-09-31-59.bpo-26228.wyrHKc.rst [new file with mode: 0644]