I have a cron job set up that will start my script.
The intent of this script is to kill a process that is currently running, and start up a new version of this process (CHECKDB). CHECKDB needs to be running all the time, so we have a start_checkdb script that is basically a infinite loop that runs CHECKDB; if it crashes, it stays in the loop, starts it again. [yes, i realize that isn't the best practice, but that's not what this is about]
My script will be called by cron without issue, and then it will kill CHECKDB without issue. As far as I can tell, the child script gets called that starts CHECKDB back up, but every time I check ps after the cron runs, the process is not running. If I run the script by hand on the command line, under any shell, it works no problem: kills CHECKDB and start_checkdb, starts up start_checkdb which starts up CHECKDB.
Yet for some reason, when cron does it, the process is never running afterwards. It kills the live one, and either doesn't start it, or it starts it and kills it.
Is it possible that when cron comes to the end the parent process, it will kill the child processes that were called?
I don't know if it makes a difference, but this is on Solaris 8.