tags:

views:

232

answers:

2

Something like a daemon that will never die,

my system is fedora10

+1  A: 
while true; do php daemon.php; done

If small outages are acceptable, add sleep 1; before done so that a continually failing daemon's spawn rate is somewhat limited.

phihag
A: 

Do you want to know how to construct such a service or just how to restart it in case of failure?

You could use something on system-level, like "monit": http://www.cyberciti.biz/tips/howto-monitor-and-restart-linux-unix-service.html

Skaldrom Y. Sarg
seems inittab can solve this.
Shore