[asterisk-users] Asterisk AMI - Create a daemon (background process)
Tzafrir Cohen
tzafrir.cohen at xorcom.com
Tue Feb 26 11:09:34 CST 2013
On Tue, Feb 26, 2013 at 11:29:44AM -0500, Eric Wieling wrote:
> PHP has had memory leak issues in the past, though modern versions
> are apparently much better.
>
> The thing is, when you write a daemon you must EXPECT it to exit at
> some point, maybe the socket went away or the system restarted or
> you are out of memory, whatever. You need to make sure you handle
> these situations regardless of which language you write in. Using
> inittab is one way, daemon-tools is another.
Some Linux distributions nowadays have upstart or systemd. That makes
writing an extra daemon simpler. Regardless of the language.
> For me, PHP with its C-like syntax, decent string handling, Perl
> Regex, and POSIX process control (including fork), it is "good enough"
> for most stuff that I do.
Gah. Just write it in Perl. Or, if it's a glorified script, maybe it
just needs to be a shell script.
--
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-users
mailing list