mirror of https://github.com/python/cpython
gh-120221: Deliver real singals on Ctrl-C and Ctrl-Z in the new REPL (#120354)
This commit is contained in:
parent
203565b2f9
commit
34e4d3287e
|
@ -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)
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
Deliver real signals on Ctrl-C and Ctrl-Z in the new REPL. Patch by Pablo
|
||||
Galindo
|
Loading…
Reference in New Issue