a peculiar race workaround

expecting EOF does not automatically set exitstatus.