mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
[3.12] gh-114328: tty cbreak mode should not alter ICRNL (GH-114335) (#114410)
The terminal CR -> NL mapping setting should be inherited in cbreak mode as OSes do not specify altering it as part of their stty cbreak mode definition.
(cherry picked from commit fd49e22670
)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
This commit is contained in:
parent
4c42d98154
commit
33c1907de2
4 changed files with 30 additions and 4 deletions
|
@ -45,9 +45,6 @@ def cfmakeraw(mode):
|
|||
|
||||
def cfmakecbreak(mode):
|
||||
"""Make termios mode cbreak."""
|
||||
# Do not map CR to NL on input.
|
||||
mode[IFLAG] &= ~(ICRNL)
|
||||
|
||||
# Do not echo characters; disable canonical input.
|
||||
mode[LFLAG] &= ~(ECHO | ICANON)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue