Monit — Daemonize non-daemon process?
It will work fine for monit.. You can have it check the pid file of the process and basically what monit is doing is doing a
ps aux | grep pid#
If it's there it think's it's up and running. If you don't have a pid file you can check a process also via something like
check process myprocessname
matching "myprocessname"
That pretty much does a
ps aux | grep myprocessname
Easy way is to deamonize your non-deamon proces. That is, create shell script:
#!/bin/sh
/usr/local/bin/your_program < /dev/null &
And then use that script as a daemon to run. It will start your program (which will create PID file) in background, and then will return control immediately, thus avoiding timeout and spurious killing by monit.