gh-85984: Add _POSIX_VDISABLE from unistd.h to termios module.#114985
Conversation
Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com>
|
In a previous PR in this series (#101832), I mentioned the idea of writing a Python library that mimics This is not a dependency of the main set of changes of this series in #101833, but since this idea was conceived while working on this issue and since this PR is so small, I did not create a separate issue for this. I have added a test script as a comment. |
Sorry, something went wrong.
Sorry, something went wrong.
|
@gpshead Thank you so much! I will make my stty-like library available soon and send you a link. |
Sorry, something went wrong.
…ython#114985) Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
This follows #102413.
POSIX General Terminal Interface defines Special Control Characters. An example of this is the
INTRcharacter, which is usually set toControl-C, which sends theSIGINTsignal to interrupt a process running in the terminal.POSIX General Terminal Interface allows the programmer to disable these characters by setting them to
_POSIX_VDISABLE, which is defined in POSIX<unistd.h>. This is how POSIXstty(1)disables special control characters internally; for example, running the following command will disable theINTRcharacter:stty intr undefNow hitting
Control-Cwill not sendSIGINTto the running process until it is reset using the following command:stty intr ^c.At any given point of time, check all terminal settings by running
stty -a.This PR adds
_POSIX_VDISABLEto thetermiosmodule.