Skip to content

Commit

Permalink
[3.13] gh-120221: Deliver real singals on Ctrl-C and Ctrl-Z in the ne…
Browse files Browse the repository at this point in the history
…w REPL (GH-120354) (#120368)
  • Loading branch information
miss-islington authored Jun 11, 2024
1 parent a6c4080 commit 7aafa30
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Lib/_pyrepl/unix_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,13 +324,13 @@ def prepare(self):
"""
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)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Deliver real signals on Ctrl-C and Ctrl-Z in the new REPL. Patch by Pablo
Galindo

0 comments on commit 7aafa30

Please sign in to comment.