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/17/2000 07:13:39
I know this solves the problem in the wrong way, but here's what Mike Karels
added to BSD/OS when I complained bitterly about the same close() wait bug:

NAME
     stty - set the options for a terminal device interface

	...

     flushout    Flush the output queue for the device.  This is most useful
                 when an exiting process is stuck waiting for terminal output
                 to drain.

It's been real, real, real useful even though timeouts on tty_close() would
be better.  (A minor nit on Greg's proposal -- the timeouts should be in the
underlying close, not close() itself and not exit().  The socket code already
has them, and that's the level-set for where to put the rest of them.)