-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Terminal settings are not correctly restored on repl exit #128330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
stdlib
Python modules in the Lib dir
topic-repl
Related to the interactive shell
type-bug
An unexpected behavior, bug, or error
Comments
citrus-it
added a commit
to omniosorg/cpython
that referenced
this issue
Dec 29, 2024
citrus-it
added a commit
to omniosorg/cpython
that referenced
this issue
Jan 12, 2025
pablogsal
pushed a commit
that referenced
this issue
Jan 23, 2025
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jan 23, 2025
…pl exit (pythonGH-128331) (cherry picked from commit 0b15d9c) Co-authored-by: Andy Fiddaman <[email protected]>
Tripathi-Manjul
pushed a commit
to Tripathi-Manjul/cpython
that referenced
this issue
Jan 23, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
stdlib
Python modules in the Lib dir
topic-repl
Related to the interactive shell
type-bug
An unexpected behavior, bug, or error
Bug report
Bug description:
I am working on updating the version of Python that ships in OmniOS -- an illumos distribution -- from 3.12 to 3.13 and have encountered a problem with terminal settings not being properly restored when exiting from the interactive interpreter prompt.
In particular, I see the EOF character changing from 0x4 (^D) to 0x1 (^A) after a trip through repl:
Using DTrace (we patch dtrace support back into python locally), I can see that all of the other settings are being restored, just not this particular control character. Here's an excerpt:
Here is the sequence that switches the terminal to raw mode. The trace shows
that
c_cc[4]
is being changed from 0x4 to 0x1. This isVMIN
so as expected.and here is where the terminal is restored:
Everything is being restored apart from that
c_cc[4]
. On illumos, VMIN andVEOF are both defined as 4, which is legitimate but different to some other
UNIX-like environments.
The bug here is that the list of control characters is not deep copied in
fancy_termios.py.
CPython versions tested on:
3.13
Operating systems tested on:
Other
Linked PRs
The text was updated successfully, but these errors were encountered: