X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=progs%2Freset_cmd.c;h=eff3af729e6090c75ac0737fb139aa482c80d89a;hp=886d0825789bbca9b2341d7dc1dac5d47e9b0cb0;hb=f9994a48d2f74b613a0adb19d3917f724d4d1312;hpb=81304798ee736c467839c779c9ca5dca48db7bea diff --git a/progs/reset_cmd.c b/progs/reset_cmd.c index 886d0825..eff3af72 100644 --- a/progs/reset_cmd.c +++ b/progs/reset_cmd.c @@ -47,13 +47,13 @@ #endif #if NEED_PTEM_H -/* they neglected to define struct winsize in termios.h -- it's only +/* they neglected to define struct winsize in termios.h -- it is only in termio.h */ #include #include #endif -MODULE_ID("$Id: reset_cmd.c,v 1.26 2021/06/26 19:44:08 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); + } } /*