Unless I misunderstand this saving a Process Id can be done (should be done) inside the first-running script filling a variable with "$!" right after command execution and writing out the value to a PID file. Then any subsequent process can just check for existence of the PID file and if necessary, restart for instance, check its value with the PID of the current process. Note checking the PID of the current process may be found with 'pidof' if available (or compatible), or 'pgrep processname', or 'pgrep -f "/path/to/process --any-args" if you need to select from say several running processes doing away with any 'ps|grep|grep -v grep'-like gremlins.
Code:
function howto() { echo "Here's some Bash scripting guide help:
http://www.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
http://www.tldp.org/LDP/Bash-Beginners-Guide/html/index.html
http://www.gnu.org/software/bash/manual/html_node/index.html
http://www.grymoire.com/Unix/Sh.html
http://www.tldp.org/LDP/abs/html/
http://mywiki.wooledge.org/BashFAQ
http://mywiki.wooledge.org/BashPitfalls"; }