Found a #bash #shell pitfall: you cannot `wait` for a process that is not a child of the shell.
I was trying to write a shell script that watches (externally started) processes and notifies when one of them crashes, but `wait` does not work here so maybe some polling is necessary.