read_contents shouldn't die on EINTR