monitoring the main app in c
===

i have done my program mainApp that owns main() method and main() creates 5 threads, threads do some operations.. so on.

now im just wondering if my program crashes. So im gonna monitor my mainApp whether it is working or stopped. if stopped Im gonna restart/reboot the whole system.

mainApp and monitoring program have to run at the same time and monitor prog should check mainApp's status.

any suggestions pls.

PS: im om linux kernel 2.6.29.
