Subject: Re: patch to /etc/rc to stop xfs race condition
To: None <port-pmax@netbsd.org>
From: Greg A. Woods <woods@most.weird.com>
List: port-pmax
Date: 10/25/1998 01:19:26
[ On Sat, October 24, 1998 at 19:28:11 (-0600), Michael L. Hitch wrote: ]
> Subject: Re: patch to /etc/rc to stop xfs  race condition
>
> On Oct 23,  7:24pm, Jonathan Stone wrote:
> > 
> > ... could someone who ahs the patch to rc add a ``set +m'' or
> > whatever-it-is please email me a copy? I would like to
> > get some kind of fix for this into 1.3.3.
> 
>   Here's my patch.  It looks like someone stuck a "sleep 2" into the
> file to fix this problem (or a similar one).
> 
> --- /c/src/etc/rc	Mon Jul 13 05:05:04 1998
> +++ /etc/rc	Tue Mar  3 22:23:49 1998
> @@ -424,8 +412,8 @@
>  
>  # Start xfs before boot daemons, so its ready before client xterminals.
>  if checkyesno xfs; then
> +	set -m
>  	echo -n ' xfs';			xfs $xfs_flags &
> -	sleep 2
>  fi
>  
>  if checkyesno rarpd; then
> 

Wouldn't it be one heck of a lot simpler and more concrete just to fix
xfs to call daemon(3) [perhaps if given a '-daemon' flag, or alternately
unless given a '-nofork' flag]?  I had thought I'd seen some message on
source-changes to this effect, but I can't find any such calls in
-current.  Perhaps it was only discussed but never done.

The other more preferable option would indeed be to start xfs in a
sub-shell, possibly one fired up by nohup?

While whomever's checking in the change to xfs, perhaps they could at
the same time to set the error file to something somewhere other than
under /usr?  I prefer:

	error-file = /var/log/xfs-errors

(I've got all my X config files under /etc/X11 too, but that's probably
not something to change in a patch release like 1.3.3!  ;-)

-- 
							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>