Waiting for process
Until now, I did the following to wait for a process:
$ wait $pidThe above does only work for child processes (stared by the same shell). The hack works for any processes:
$ tail --pid=$pid -f /dev/nullLearned from to StackOverflow answer.