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
Most of the Unix/Linux init programs will manage daemons for you and restart them. Look into placing your service in /etc/inittab. Or you might be using Upstart or systemd.
All of these programs run as PID 1 and it is their job to monitor and restart system processes.
From your Busybox tag I would assume you are running an embedded system. On those, the System V style init scripts with all of their shell scripts are really overkill. You should probably rip all that out and replace it with entries in /etc/inittab or upstart or systemd jobs.