Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Apr 2002 05:50:02 -0700 (PDT)
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: conf/37370: Serial drainwait shouldn't be zero (forever) by default
Message-ID:  <200204231250.g3NCo2P58444@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR conf/37370; it has been noted by GNATS.

From: Bruce Evans <bde@zeta.org.au>
To: "Daniel O'Connor" <doconnor@gsoft.com.au>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: conf/37370: Serial drainwait shouldn't be zero (forever) by
 default
Date: Tue, 23 Apr 2002 22:49:51 +1000 (EST)

 On Tue, 23 Apr 2002, Bruce Evans wrote:
 
 > On Tue, 23 Apr 2002, Daniel O'Connor wrote:
 >
 > > >Description:
 > > With the default it seems very easy to get a process stuck forever (say connected to a UPS)
 > >
 > > >How-To-Repeat:
 > > Not really sure but I have 2 stuck apcsmart processes on machines I would rather not reboot.
 > >
 > > >Fix:
 > >
 > > Apply http://www.gsoft.com.au/~doconnor/sensible-drainwait.diff
 >
 > This just breaks default().  From the non-broken rc.serial:
 >
 > > default() {
 > > 	# Reset everything changed by the other functions to initial defaults.
 > 	                                                     ^^^^^^^
 > > ...
 > > 		comcontrol /dev/tty${ci}${i} dtrwait 300 drainwait 0
 > 		                                     ^^^           ^
 >
 > The initial defaults are determined by the driver, not by rc.serial.  The
 > default for drainwait is known to be 0, since any other value would break
 > POSIX conformance.  The default for dtrwait is not so well known; the
 > value of 300 is just sio's rather arbitrary value.
 
 Oops, the change only "breaks" default() in non-current versions of
 FreeBSD.  The initial default is still 0 in RELENG_4, but in -current
 it is 300 at boot time and `sysctl kern.drainwait` after boot time.
 
 This rarely matters, since if you use /etc/rc.serial at all, then you
 should only use default() to restore the initial defaults in preparation
 for changing only some of the defaults using one of the other functions
 in rc.serial or otherwise.  All of the other functions in rc.serial
 except mouse() set drainwait to a more useable value.  A timeout might
 be useful even for mouse(), to recover from the error of setting
 crtscts on the mouse.
 
 Bruce
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204231250.g3NCo2P58444>