[asterisk-dev] [Code Review] Launchd property list for Mac OS X

Tzafrir Cohen tzafrir.cohen at xorcom.com
Mon Mar 15 03:10:20 CDT 2010


On Mon, Mar 15, 2010 at 07:10:43AM +0100, Olle E. Johansson wrote:
> 
> 14 mar 2010 kl. 22.40 skrev Tzafrir Cohen:
> 
> > On Sun, Mar 14, 2010 at 08:59:06PM -0000, Olle E Johansson wrote:
> >> 
> >> -----------------------------------------------------------
> >> This is an automatically generated e-mail. To reply, visit:
> >> https://reviewboard.asterisk.org/r/551/#review1668
> >> -----------------------------------------------------------
> >> 
> >> Ship it!
> >> 
> >> 
> >> Suggestion: Change safe_asterisk to start with launchd.
> > 
> > Why do you need safe_asterisk?
> I suggested the change since many people use it. Maybe we just could
> put out a warning there if safe_asterisk is used on OS/X.

safe_asterisk with launchd adds unneeded complexity and a source of
bugs. Why would you recommend people to use it?
 
if you need any speicfic feature of it, make sure it is supported by
other scriptary.

> > 
> > Doesn't launchd handle restarting? If so, all the hacks you need could
> > be put in simple pre/post scripts. safe_asterisk's handling of
> > restarting is buggy and hides problems from the system administrator.
> I agree - but it is still frequently used and referred to in a lot of
> documentation out there.

That's a bug (in the documentation). Likewise newer Linux distributions
move to upstart. Sadly most of them still use it in sysv-init
compatibility mode.

Another interesting thing to point out is that such monitor daemons
break the implicit assumption that there is a human reading the asterisk
console. Upstart and co. better not use a forked daemon: they want to
know when the daemon disappeared. However printing messages to the
console (or trying to guess anything from its terminal type) is
rather pointless.

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the asterisk-dev mailing list