]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-26228: Fix pty EOF handling (GH-12049)
authorZephyr Shannon <geoffpshannon@gmail.com>
Wed, 11 Aug 2021 22:21:46 +0000 (15:21 -0700)
committerGitHub <noreply@github.com>
Wed, 11 Aug 2021 22:21:46 +0000 (00:21 +0200)
commit81ab8db235580317edcb0e559cd4c983f70883f5
tree77894e660eba54cfe86044fa73b04fef02845d84
parent64a7812c170f5d46ef16a1517afddc7cd92c5240
bpo-26228: Fix pty EOF handling (GH-12049)

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>
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]