wait for process termination in a different thread