in reply to Perl daemon that runs another daemon

At the beginning of a daemon, there's a fork to detach from the controlling terminal. Then you should daemonize your process properly:

Of course the processes from which you have forked must exit immediately after the fork.

Your daemon should now be safe. See the section Complete Dissociation of Child from Parent in perlipc.

Your

_start => sub { qx(/etc/init.d/asterisk start); }

subroutine should do that, and finally exec /etc/init.d/asterisk start after checking whether it is running already.

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}