Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Apr 2002 05:10:03 -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:  <200204231210.g3NCA3p43680@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:10:05 +1000 (EST)

 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.
 
 Actual fix: use values suitable for your application and/or hardware.
 I often use 1 for drainwait to unwedge terminals as fast as possible,
 and notice the problems from the non-POSIX-conformance of this when
 I forget to change it back to a reasonable value.  Any nonzero value
 is just broken if normal draining for some reason takes longer.
 
 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?200204231210.g3NCA3p43680>