mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
When filec active, TCSANOW was used in any case instead of
sensing TCSADRAIN/TCSAFLUSH Obtained from: NetBSD
This commit is contained in:
parent
ebd70bcd2c
commit
f3e38b1c4c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=9257
|
@ -30,7 +30,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: file.c,v 1.2 1994/09/24 02:54:03 davidg Exp $
|
||||
* $Id: file.c,v 1.3 1995/05/30 00:06:33 rgrimes Exp $
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
|
@ -112,14 +112,14 @@ static void
|
|||
setup_tty(on)
|
||||
int on;
|
||||
{
|
||||
static struct termios tchars;
|
||||
struct termios tchars;
|
||||
|
||||
(void) tcgetattr(SHIN, &tchars);
|
||||
|
||||
if (on) {
|
||||
tchars.c_cc[VEOL] = ESC;
|
||||
if (tchars.c_lflag & ICANON)
|
||||
on = TCSANOW;
|
||||
on = TCSADRAIN;
|
||||
else {
|
||||
on = TCSAFLUSH;
|
||||
tchars.c_lflag |= ICANON;
|
||||
|
@ -127,10 +127,10 @@ setup_tty(on)
|
|||
}
|
||||
else {
|
||||
tchars.c_cc[VEOL] = _POSIX_VDISABLE;
|
||||
on = TCSANOW;
|
||||
on = TCSADRAIN;
|
||||
}
|
||||
|
||||
(void) tcsetattr(SHIN, TCSANOW, &tchars);
|
||||
(void) tcsetattr(SHIN, on, &tchars);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue