in reply to how to determine pipe process terminated or alive
Sometimes
sleep $interval while kill 0, $pid; [download]
After Compline,Zaxo