David Finberg writes:
> On Tue, 6 May 2008, Robert Sturrock wrote:
> 
> > The Hylafax startup forks _two_ daemons: faxq and hfaxd.
> >
> > "faxq" dies from time to time - we would like to use SMF to
> > automatically restart this.  However, our (naive) configuration does
> > not cater for this situation as SMF won't stop/start the service as a
> > whole unless _both_ "faxq" and "hfaxd" have exited.
> 
> Why do you have the ignore_error?  That's preventing the behavior you 
> want,
> 
>    startd/ignore_error    The ignore_error  property,  if  set,
>                              specifies  a  comma-separated list of
>                              ignored  events.  Legitimate   string
>                              values in that list are core and sig-
>                              nal. The default is to restart on all
>                              errors.

One reason could be the same as I mentioned in the long-running thread
last week: if you don't set ignore_error, then any failure in an
external script you may invoke -- such as PCL2FaxCmd dropping core --
will cause the whole service to get restarted rather than just failing
the current operation.

Most non-trivial open source daemons I've worked with have extensive
configuration options to invoke external scripts, and many of them
assume that no harm will come from doing so.  You can get surprising
results by allowing those things to stay in the same process contract.

-- 
James Carlson, Solaris Networking              <james.d.carlson at sun.com>
Sun Microsystems / 35 Network Drive        71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677

Reply via email to