[lug] Re: Running a PHP script as a daemon - Restart it automatically

Rodolfo Estrada restrada at linuxmail.org
Thu May 18 13:07:32 MDT 2006


Check daemontools

http://cr.yp.to/daemontools.html

Regards,

Rodolfo


> ----- Original Message -----
> From: gordongoldin at netscape.net 
> To: lug at lug.boulder.co.us
> Subject: [lug] Re: Running a PHP script as a daemon - Restart it	automatically
> Date: Thu, 18 May 2006 14:06:04 -0400
> 
> 
> >>> 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
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug

>




More information about the LUG mailing list