「no data available」(資料尚未出現)與「end of data」(到達資料末端)並不相同。就
EOF 的情況而言,是指到達了檔案末端。就受阻檔的情況而言,讀取操作正在等待更多
的資料—例如,對一個socket 或一個裝置檔進行讀取操作的情況。
有些錯誤是可復原的。舉例來說,如果進行
read()
呼叫時,卻在讀取任何位元組之前遭 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.