Subject: Re: why must exiting processes wait forever for events that never occur?!?!?!
To: NetBSD Kernel Technical Discussion List <tech-kern@netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: tech-kern
Date: 10/17/2000 14:42:20
[ On Tuesday, October 17, 2000 at 07:13:39 (-0700), Paul A Vixie wrote: ]
> Subject: Re: why must exiting processes wait forever for events that never occur?!?!?! 
>
> 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.

Yes, that would be a really handy feature to have indeed!  (though in
yesterday's event on my router I'd still have been screwed since I
couldn't even "su" -- unless I compiled a custom "su" without openlog()
on my NFS fileserver and installed it so I could run it from the router)

>  (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.)

Yes, that's more along the lines of what I had in mind -- though I guess
you'd have to pass indication in from exit() so that close knew to do
the timeouts....

-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods@acm.org>      <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>