Subject: Re: why must exiting processes wait forever for events that never occur?!?!?!
To: NetBSD Kernel Technical Discussion List <tech-kern@netbsd.org>
From: Paul A Vixie <vixie@mibh.net>
List: tech-kern
Date: 10/28/2000 22:19:50
Sorry I'm late following up on this...

> > Actually, what makes Mike's solution sillier is that there's already
> > another way to do it.  `stty -f /dev/tty... -crtscts -cdtrcts -mdmbuf'
> > should unstick the tty and cause any output to drain (unless the line
> > has been disconnected, in which case output is flushed anyway).

That's true if (1) one is aware of every possible kind of flow control NetBSD
understands, and (2) none has been added since the last time one read stty(1).

Neither of those is true in my case.  I believe Mike implemented "stty
flushout" in terms of the options shown in the above snippet.  Because I
want on some days to just be a user, I want commands to describe what I
am trying to do rather than what bits to turn on or off to get it done,
and I do not think NetBSD ought to require relatively deep technical
knowledge in order to get the least-astonishing behaviour.

And in that last vein, a timeout in close() makes way more sense than
"stty flushout", just as "stty flushout" makes way more sense than
"stty -crtscts -cdtrcts -mdmbuf".