From 3406089647393c7593e37ee0661a179a9d848c49 Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Wed, 24 Jan 2024 17:27:41 -0800 Subject: 52468: save and restore state of correct TTY when using read -s / -d --- Src/utils.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Src/utils.c') diff --git a/Src/utils.c b/Src/utils.c index 0f66984cd..1a4f4c14b 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -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 -- cgit v1.2.3