1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-12-02 04:31:14 +01:00

52468: save and restore state of correct TTY when using read -s / -d

This commit is contained in:
Bart Schaefer 2024-01-24 17:27:41 -08:00
parent dde12593db
commit 3406089647
3 changed files with 34 additions and 15 deletions

View file

@ -1730,6 +1730,13 @@ freestr(void *a)
/**/
mod_export void
gettyinfo(struct ttyinfo *ti)
{
fdgettyinfo(SHTTY, ti);
}
/**/
mod_export void
fdgettyinfo(int SHTTY, struct ttyinfo *ti)
{
if (SHTTY != -1) {
#ifdef HAVE_TERMIOS_H
@ -1755,6 +1762,13 @@ gettyinfo(struct ttyinfo *ti)
/**/
mod_export void
settyinfo(struct ttyinfo *ti)
{
fdsettyinfo(SHTTY, ti);
}
/**/
mod_export void
fdsettyinfo(int SHTTY, struct ttyinfo *ti)
{
if (SHTTY != -1) {
#ifdef HAVE_TERMIOS_H