[asterisk-dev] daemonising after possible errors
Martin Vít
vit at lam.cz
Fri Dec 8 09:48:10 MST 2006
Jared Smith wrote:
> On 12/7/06, Tzafrir Cohen <tzafrir.cohen at xorcom.com> wrote:
>> > Something that I find bothering when I try to debug Asterisk is
>> that it
>> > deamonizes before most errors can occour. It will fork into background
>> > before many potential fatal errors occour. Such fatal errors are in
>> the
>> > module loading time.
>
> Personally, I'm all for this. One of the most common problems I see
> (especially when teaching Asterisk classes) is that people
> misconfigure the signalling (or misnumber their channels) in
> zapata.conf and Asterisk starts, forks to the background, and then
> fails. It would be quite helpful if it loaded the modules first
> (reporting any errors), and then forked to the background.
> Unfortunately, I have no idea how hard this would be to implement.
>
> Anybody else feel like commenting?
Why not test confuguration before daemonizing?
asterisk -vvvdddgcd
if it starts and configs are ok, then stop and fork. Or you can tail -f
/var/log/syslog (if logging into syslog) or tail -f
/var/loga/asterisk/whateveryouwant before starting it
Apache2 behaves like this, other dameons forks and errors writes to its
log facilities with no errors or warnings on stderr or stdout.
>
> -Jared
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
>
--
Martin Vít
LAM plus s.r.o.
http://www.lam.cz/
Tel.: 605 267 610
More information about the asterisk-dev
mailing list