Create the program that you want to constantly run as a child of the "observer" process, which restarts it when it exits. You can use wait / waitpid (or SIGCHILD) to indicate when the child completes. I would expect someone to write code for this (this is pretty much what init (8) does)
However, the program seems to be doing something. You may want to not only check if the application is working, but also that it is not hanging or something else, and provides the service for which it is intended. This may mean starting some kind of trial or synthetic transaction to work properly.
EDIT: you can get init to do this for you - give it a respawn type in inittab. On the man page:
respawn The process will be restarted whenever it terminates (eg getty).
source share