🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.bugs.v7
Article #108

flushtty vs XON/XOFF

#108
From: utzoohenry
Date: Thu, 17 Mar 1983 22:01
23 lines
1321 bytes
There is an interesting bit of code in the V7 tty driver.  The
flushtty() routine turns off the "stopped" bit used for stop/start
handshaking.  This is very entertaining if your terminal really
does expect the cpu to honor this protocol all the time.  This
routine is called at the following times:

	final close of the device
	TIOCSETP
	TIOCFLUSH
	interrupt or quit character
	input queue overflow

At final-close time, this is arguably reasonable, since in theory
you no longer care what the device does.  Maybe.  (In any event,
the very next line of ttyclose() after the flushtty() call gives
the same effect.)  At the other times, it can be a disaster.  It's
a mystery why this doesn't cause trouble more often;  I discovered
it when tracking down the cause of some ugly misbehavior by a printer
which is being run off a tty line temporarily.

Can anyone suggest circumstances in which this apparent botch yields
useful behavior?  I can't.  Reply by mail, please;  I'll summarize
responses for the net.
Technical Details
Message-ID: <bnews.utzoo.2878>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
From: utzoo!henry
Newsgroups: net.bugs.v7,net.unix-wizards
Title: flushtty vs XON/XOFF 
Article-I.D.: utzoo.2878
Posted: Thu Mar 17 22:01:40 1983
Received: Thu Mar 17 22:01:40 1983
Subject: flushtty vs XON/XOFF
Date: Thu, 17 Mar 1983 22:01:40 +0000
Message-ID: <bnews.utzoo.2878>