Dana Baron wrote:
Greetings,
Looking for some advice with Phantoms (seems to be a theme lately). I have a udt program that I want to have always running (infinite loop). I want to start this as a background process using PHANTOM. Pretty straight forward so far. How can I do this so the process keeps running even after I log out the process that started it?
One way I've handled this in UV is to create a logon for the phantom process and check the @TTY variable within the process itself. If @TTY = "phantom" then I go into the loop, otherwise I execute the PHANTOM command to spawn another copy and let the current process terminate.
If you want to insure the process is always running, even after a reboot, you can have a shell script run by cron start the phantom process. Just write a flag to a flat file somewhere when the process starts and check it in the cron script to avoid starting more than 1 process. You still have to remember to remove the flag prior to a system shutdown though, or you could add a startup script (/etc/init.d for most *nixes) to remove it.
-John
------- u2-users mailing list [EMAIL PROTECTED] http://www.u2ug.org/listinfo/u2-users