summaryrefslogtreecommitdiffstats
path: root/Lib/_pyrepl
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-06-11 19:46:07 (GMT)
committerGitHub <noreply@github.com>2024-06-11 19:46:07 (GMT)
commit7aafa305d40fe2aad2d2e2fad4079fb868dd2e7e (patch)
tree9600028186d9bcb76107c5e7f1e7bbd91e0d5a4e /Lib/_pyrepl
parenta6c4080aaa646d8d3a0e54a6de7557b230c09341 (diff)
downloadcpython-7aafa305d40fe2aad2d2e2fad4079fb868dd2e7e.zip
cpython-7aafa305d40fe2aad2d2e2fad4079fb868dd2e7e.tar.gz
cpython-7aafa305d40fe2aad2d2e2fad4079fb868dd2e7e.tar.bz2
[3.13] gh-120221: Deliver real singals on Ctrl-C and Ctrl-Z in the new REPL (GH-120354) (#120368)
Diffstat (limited to 'Lib/_pyrepl')
-rw-r--r--Lib/_pyrepl/unix_console.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/_pyrepl/unix_console.py b/Lib/_pyrepl/unix_console.py
index f1a6b84..af92908 100644
--- a/Lib/_pyrepl/unix_console.py
+++ b/Lib/_pyrepl/unix_console.py
@@ -324,13 +324,13 @@ class UnixConsole(Console):
"""
self.__svtermstate = tcgetattr(self.input_fd)
raw = self.__svtermstate.copy()
- raw.iflag &= ~(termios.BRKINT | termios.INPCK | termios.ISTRIP | termios.IXON)
+ raw.iflag &= ~(termios.INPCK | termios.ISTRIP | termios.IXON)
raw.oflag &= ~(termios.OPOST)
raw.cflag &= ~(termios.CSIZE | termios.PARENB)
raw.cflag |= termios.CS8
- raw.lflag &= ~(
- termios.ICANON | termios.ECHO | termios.IEXTEN | (termios.ISIG * 1)
- )
+ raw.iflag |= termios.BRKINT
+ raw.lflag &= ~(termios.ICANON | termios.ECHO | termios.IEXTEN)
+ raw.lflag |= termios.ISIG
raw.cc[termios.VMIN] = 1
raw.cc[termios.VTIME] = 0
tcsetattr(self.input_fd, termios.TCSADRAIN, raw)