X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;ds=sidebyside;f=progs%2Freset_cmd.c;h=eff3af729e6090c75ac0737fb139aa482c80d89a;hb=461e72d1826483cb2c2cb243412f2dc5b00b2b1a;hp=e740fa667921e12fee6eab7fd20fb0d13ddd2159;hpb=643ec2bf782cd02efafe3ccdeaea8920a404645e;p=ncurses.git diff --git a/progs/reset_cmd.c b/progs/reset_cmd.c index e740fa66..eff3af72 100644 --- a/progs/reset_cmd.c +++ b/progs/reset_cmd.c @@ -53,7 +53,7 @@ #include #endif -MODULE_ID("$Id: reset_cmd.c,v 1.27 2021/09/04 10:29:59 tom Exp $") +MODULE_ID("$Id: reset_cmd.c,v 1.28 2021/10/02 18:08:44 tom Exp $") /* * SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS, @@ -193,7 +193,7 @@ out_char(int c) * a child program dies in raw mode. */ void -reset_tty_settings(int fd, TTY * tty_settings) +reset_tty_settings(int fd, TTY * tty_settings, int noset) { GET_TTY(fd, tty_settings); @@ -329,7 +329,9 @@ reset_tty_settings(int fd, TTY * tty_settings) ); #endif - SET_TTY(fd, tty_settings); + if (!noset) { + SET_TTY(fd, tty_settings); + } } /*