Wait for processes to exit to avoid zombie processes before gssh exit.