wait until each child terminates when kill all workers