bpo-26228: Fix pty EOF handling by RadicalZephyr · Pull Request #12049 · python/cpython
When both file descriptors gracefully report an error. This presents custom implementations of *master_read* and *stdin_read* that accidentally or intentionally return an empty byte string from blocking the terminal. Co-Authored-By: Reilly Tucker Siemens <reilly@tuckersiemens.com>
ambv
mentioned this pull request
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request
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 81ab8db) Co-authored-by: Zephyr Shannon <geoffpshannon@gmail.com>
ambv pushed a commit that referenced this pull request
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 81ab8db) Co-authored-by: Zephyr Shannon <geoffpshannon@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters