Subject: Re: pkg/19002: rc.d/cyrus slightly broken
To: Frank Cusack <fcusack@fcusack.com>
From: Greg A. Woods <woods@weird.com>
List: netbsd-bugs
Date: 11/10/2002 11:48:45
[ On Sunday, November 10, 2002 at 02:48:42 (-0800), Frank Cusack wrote: ]
> Subject: pkg/19002: rc.d/cyrus slightly broken
>
> 	1) stdin/stdout/stderr should be redirected to /dev/null.  I
> 	   won't go into why this should be, I'm sure it's well understood.

In general I very strongly disagree with forcing stdio to /dev/null on a
daemon on startup.  Properly coded daemons do the right thing at the
right time and their output should not ever be forcibly discarded on
their behalf.

What _specific_ reasons do you feel they should be re-directed for this
particular program?

> 	2) The 'sleep 2' bit causes master to receive SIGHUP after 2s.

That sounds like a fairly important bug that should be fixed properly,
whatever that means.

I'm not sure exactly where the bug is though.  Does the SIGHUP cause a
problem for the daemon?  If so, why?  Daemons normally reload their
configurations on SIGHUP -- does this one do that?

Are you certain you have correctly determined the cause of the SIGHUP?
I would have expected that it is normally be generated when /etc/rc
exits, not when the sleep exits.

> 	   It doesn't seem to have any real function, but master
> 	   receiving an unnecessary SIGHUP *is* bad, so removing it seems
> 	   to be the easiest fix.

That sleep must have been put there for some reason that the person
writing it thought was important (no other script has a similar
feature).  Perhaps we need to ask what that reason is first!

At first glance it looks like this particular daemon is not designed to
run stand-alone from /etc/rc on a *BSD system.  If so then it needs some
(relatively minor) patches to correct this deficiency before it is truly
viable for use on NetBSD.

-- 
								Greg A. Woods

+1 416 218-0098;            <g.a.woods@ieee.org>;           <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>