[lug] Re: Running a PHP script as a daemon - Restart it automatically
Gordon Golding
gordongoldin at netscape.net
Thu May 18 12:06:04 MDT 2006
>>>and restart if for some reason PHP encounters a critical error and crashes (connection drop for example).
I do a simple restart on Postgres - a cron job checks for postmaster process - if it doesn't find it, it restarts Postgres.
Anybody have a more "elegant" solution? Like pipe 2> to a script that will hear the error and do a restart immediately.....?
Or start it in a loop in a script that just restarts it when it dies and returns control to its mother process....?
I imagine there is a "professional" way to do this.... ;-)
--
Gordon Golding
aka Golding the Younger DH70
gordongoldin at netscape.net
http://cslr.colorado.edu/beginweb/cgi-bin/gen_page.php?user=goldingg&&group=STF
303-494-5730
"If Love is Blind, why is lingerie so popular?"
__________________________________________________________________
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register
Netscape. Just the Net You Need.
New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp
More information about the LUG
mailing list