fix a possible deadlock when an executable dies while receiving