tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: launchd port: Worth it?



"Aaron B." <aaron%zadzmo.org@localhost> writes:

> Using a simple state machine and the code from rcorder to build a
> dependancy graph I expect it could perform a parallelized
> boot.

That sounds like a worthy goal.  Once there is code to run things in
parallel (probably not too hard), I think we'll run into two problems:

  unexpressed dependencies, hidden by the standard serializaion order

  daemons return before they are ready.  The rc.d script executes food,
  and food does a double fork and the parent returns.  However, the
  child is not ready to process events.  Arguably these issues should be
  fixed in each daemon, having the parent wait for the child to signal
  that it is finished initing.  I have seen this problem with iked/spmd
  in racoon2, but I would be really surprised if we don't have instances
  of it in-tree.  This is also covered up by the present system.

> However what I wanted was a system that restarts crashed daemons
> and had an easy command line tool to monitor/enable or disable/etc
> your processes, like the 'service' in Redhat or 'svcadm' in Solaris
> 10, but more....  BSD.

I suppose it's not too hard to write something that does
/etc/rc.d/status on various daemons, enabled by foo_monitor=YES in rc.d.

enable/disable seems like a script to edit the rc.conf file, or perhaps
this gets pushed out to lightweight database (half joking there).

Attachment: pgpKEqmKpZoSh.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index