Either a file descriptor refers to no open file or a read request was made to a file that is open only for writing.