tech-userlevel archive

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

Re: launchd port: Worth it?



Hi,

On Fri, 15 Mar 2013 11:01:28 -0400 Aaron B. wrote:
> On Thu, 14 Mar 2013 21:15:17 -0400
> matthew sporleder <msporleder%gmail.com@localhost> wrote:
> 
> > On Thu, Mar 14, 2013 at 8:17 PM, Christos Zoulas 
> > <christos%zoulas.com@localhost>
> > wrote:
> > > On Mar 14,  6:13pm, brooks%freebsd.org@localhost (Brooks Davis) wrote:
> > > -- Subject: Re: launchd port: Worth it?
> > >
> > > | The FreeBSD port is quite dated.  My understanding is that shortly
> > > after | it was completed Apple basically rewrote launchd so starting
> > > from | scratch may be required.
> > >
> > > Could be! I have not looked recently, anyway there are pieces that can
> > > be salvaged :-)
> > >
> > > christos
> > 
> > Incremental improvements to the existing rc is probably a better project.
> 
> 
> I built a toy program some time ago that would monitor a daemon's state
> using EVFILT_PROC filter in kqueue. My plan was a daemon that would run
> under init, not replace it; and use the existing scripts in /etc/rc.d/
> to actually start and stop services. 
> 
> Using a simple state machine and the code from rcorder to build a
> dependancy graph I expect it could perform a parallelized boot. 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.

Please have a look at sysutils/fscd. It monitors processes and restarts them
once they die, you can enable/disable monitoring by using fscadm(8). This also
introduces the service(8) script from FreeBSD (which is just a wrapper for
rc_directories), which was rejected for NetBSD.

Anyway, when it comes to such improvements, you should maybe get in touch with
trhodes@fb, he started fscd and had several ideas on how to work on the
existing BSD rc to achieve the goals you proposed.

Regards, Julian

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index