Subject: kern/2131: Kernel sends XOFF to early?
To: None <gnats-bugs@NetBSD.ORG>
From: None <leo@marco.de>
List: netbsd-bugs
Date: 02/26/1996 13:44:00
>Number:         2131
>Category:       kern
>Synopsis:       Kernel sends XOFF to early?
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 26 08:05:00 1996
>Last-Modified:
>Originator:     
>Organization:
leo@dachau.marco.de			in real life: Matthias Pfaller
marco GmbH, 85221 Dachau, Germany	tel: +49 8131 516142
>Release:        960224
>Environment:
	
System: NetBSD tabatha 1.1_ALPHA NetBSD 1.1_ALPHA (ROBIN) #0: Mon Nov 6 16:27:59 MET 1995 leo@robin:/usr/src/sys/arch/i386/compile/ROBIN i386


>Description:
	With ixoff enabled, the kernel sends XOFF as soon as you type enter
	twice when there is no program reading your input. This is *very*
	annyoing. Is this the intended behaviour or a bug?

>How-To-Repeat:
	$ stty ixoff
	$ sleep 100
	<cr><cr>

>Fix:
	I suspect that this is a bug in sys/kern/tty.c:ttyblock:

		/*
		 * Block further input iff: current input > threshold
		 * AND input is available to user program.
		 */
		if ((total >= TTYHOG / 2 &&
		     !ISSET(tp->t_state, TS_TBLOCK) &&
		     !ISSET(tp->t_lflag, ICANON)) || tp->t_canq.c_cc > 0) {
	
	should this eventually read something like:

		/*
		 * Block further input iff: current input > threshold
		 * AND input is available to user program.
		 */
		if (total >= TTYHOG / 2 && ((
		     !ISSET(tp->t_state, TS_TBLOCK) &&
		     !ISSET(tp->t_lflag, ICANON)) || tp->t_canq.c_cc > 0)) {
>Audit-Trail:
>Unformatted: