a means to wait for dying children with a timeout (not yet tested)