[asterisk-dev] [svn-commits at lists.digium.com: [svn-commits] dhubbard: branch 1.4 r112689 - /branches/1.4/main/asterisk.c]

Tzafrir Cohen tzafrir.cohen at xorcom.com
Tue Apr 8 14:35:06 CDT 2008


On Tue, Apr 08, 2008 at 10:46:49AM -0700, Daniel Hazelbaker wrote:
> On Apr 7, 2008, at 3:06 PM, Tzafrir Cohen wrote:
> 
> >> The asterisk startup script happily reports "[SUCCESS]" (or other
> >> message depending on distro) and you never see a message unless you  
> >> go
> >> look at the log file.
> >
> > Right. Those problems occour way after forking into background.
> 
> Then more than likely it would be far too difficult to get that  
> changed.  My experience is that moving where/when a program forks is  
> like pulling teeth (not getting the developers to do it but making it  
> work without breaking something else).  I have seen programs, however,  
> whose startup scripts wait for a trigger (like the pid file being  
> created) before displaying the SUCCESS message.  This gives the forked  
> application a chance to display any messages that the user would  
> likely be interested in (before closing the stdout fd).

The PID file is created pretty early on.

In Asterisk 1.6 you can probably use asterisk-cli.conf (sp?) which is
executed very late at initialization. Though for a distribution init.d
script it means editing a user-controled script, which is sub-optimal.

-- 
               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