wait for the gracefully terminated process to die