NetBSD Problem Report #613
From gnats Mon Dec 5 19:05:16 1994
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id TAA08333 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Mon, 5 Dec 1994 19:05:15 -0800
Message-Id: <199412060305.WAA24766@cis-ts3-slip4.cis.brown.edu>
Date: Mon, 5 Dec 1994 22:05:22 -0500
From: tsm@cs.brown.edu
Reply-To: tsm@cs.brown.edu
To: gnats-bugs@NetBSD.ORG
Subject: TIOCSETAW on telnet ptys doesn't seem to flush first
X-Send-Pr-Version: 3.2
>Number: 613
>Category: kern
>Synopsis: TIOCSETAW on telnet ptys doesn't seem to flush first
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: gnats-admin
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Dec 05 19:20:05 +0000 1994
>Closed-Date: Sun Jul 06 10:17:47 +0000 1997
>Last-Modified: Sun Oct 18 23:12:03 +0000 2009
>Originator: Timothy Miller
>Release: I believe this is -current as of near the end of November
>Organization:
" Little, if any"
>Environment:
I think the next line about sums it up
System: NetBSD cis-ts3-slip4.cis.brown.edu 1.0A NetBSD 1.0A (HAYWIRE) #6: Fri Dec 2 21:40:11 EST 1994 tim@haywire.pvd.ri.us:/usr/src/sys/arch/i386/compile/HAYWIRE i386
>Description:
running a shell which has one termios setting for running programs and one for
reading input (such as zsh, which is what I'm running), the setting of the
terminal attributes, which is supposed to flush first (it does
tcsetattr(fd, TCSADRAIN, ...) which (in libc) does an ioctl(fd, TIOCSETAW, ..))
apparently does not, at least for telnet sessions (see how to repeat)
>How-To-Repeat:
I'm running slip over a 14.4 modem. Telnetting in to my system from across the
modem, most commands with multiline output have the last line or so with the
wrong formatting (in particular, the newline just does a cr, not a crnl).
Simply doing ls of my home directory does this (most of the time). Doing
something like "ls; sleep 1" appears to prevent the problem. Here's some sample
output:
tim@cis-ts3-slip4 /usr/src 0 -> ls
bin games lib sbin usr.bin
distrib gnu libexec share usr.sbin
etc includeregress sys
tim@cis-ts3-slip4 /usr/src 0 -> ls;sleep 1
bin games lib sbin usr.bin
distrib gnu libexec share usr.sbin
etc include regress sys
>Fix:
>Release-Note:
>Audit-Trail:
From: matthew green <mrg@eterna.com.au>
To: tsm@cs.brown.edu
Cc: gnats-bugs@NetBSD.ORG
Subject: Re: kern/613: TIOCSETAW on telnet ptys doesn't seem to flush first
Date: Sun, 14 Jan 1996 22:37:56 +1100
this problem is actually caused by an old telnet client that doesn't
impliment the "line mode" telnet protocol correctly (at least, this
is my understanding of it). os's like sunos4 have old, broken
telnet clients that cause this to happen.
you can fix this in netbsd by using the -k flag to netbsd, but this
causes other (but _much_ less annoying) problems (such as the telnet
prompt _not_ printing "login:" when using a real client).
this PR should be closed.
.mrg.
(ps, the "sleep 1" `fix' is interesting..)
>How-To-Repeat:
I'm running slip over a 14.4 modem. Telnetting in to my system from across the
modem, most commands with multiline output have the last line or so with the
wrong formatting (in particular, the newline just does a cr, not a crnl).
Simply doing ls of my home directory does this (most of the time). Doing
something like "ls; sleep 1" appears to prevent the problem. Here's some sample
output:
tim@cis-ts3-slip4 /usr/src 0 -> ls
bin games lib sbin usr.bin
distrib gnu libexec share usr.sbin
etc includeregress sys
tim@cis-ts3-slip4 /usr/src 0 -> ls;sleep 1
bin games lib sbin usr.bin
distrib gnu libexec share usr.sbin
etc include regress sys
State-Changed-From-To: open->closed
State-Changed-By: mrg
State-Changed-When: Sun Jul 6 03:17:47 PDT 1997
State-Changed-Why:
this is a problem with old telnet clients, and telnetd -k as i meantioend
when i first replied to this, and then forgot to close it...
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.