I want to stall the execution of my BASH script until a process is closed (I have the PID stored in a variable). I\'m thinking
while [PID IS RUNNING]; do sleep 5
You might look for the presence of /proc/YOUR_PID directory.
/proc/YOUR_PID