Can anybody tell me how to handle the software watchdog in Linux?
I have a program SampleApplication which runs continuously and I need to restart it if
Documentation for the watchdog is here: http://linux.die.net/man/8/watchdog
But it sounds like this is not what you want. The linux software watchdog will reboot the machine, not just restart your process.
You can easily make your own watchdog. For example, you could have your program periodically write some temp file, and launch a script that checks the file once in a while and restarts your process if it hasn't updated for some time.