Best way to tell if a process is still running.
Best way to tell if a process is still running.
- Subject: Best way to tell if a process is still running.
- From: Dalton Hamilton <email@hidden>
- Date: Tue, 12 Dec 2006 11:24:25 -0500
Hi -
I'm posting this question here because it is related to Inter-Process
Communication.
I have a non-gui app, called meStarter, that is started by cron every
5 minutes. meStarter then reads a config.plist file and the data in
the config.plist tells the meStarter how many metricEngine processes
to start and what parameters to pass to each. Depending on the data
found in the config.plist, the meStarter could start many
metricEngine processes. Once all the metricEngine processes have
been started, the meStarter exits.
Then in 5 minutes, cron starts the meStarter again and the meStarter
goes through the same logic; however, at this point, meStarter should
check to see if a metricEngine process is running for each record
found in the config.plist and if it isn't (which would mean the
system was rebooted or the metricEngine crashed) then it should start
another metricEngine process with that set of parameters.
So, I've though about using message-queues or domain sockets or even
creating a hidden temporary file and having meStarter delete it, and
metricEngine re-create it every minute, and then recheck for it
during the next startup. However, I know this must be a common task
and was wondering if anyone else has thought of a nice way to
accomplish this.
Thanks
Dalton Hamilton
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden