read(STDIN_FILENO, buf, sizeof(buf));
时间: 2024-04-25 22:24:03 浏览: 150
read(STDIN_FILENO, buf, sizeof(buf))是一个系统调用函数,用于从标准输入读取数据并存储到buf数组中。其中,STDIN_FILENO是标准输入文件描述符,buf是存储读取数据的缓冲区,sizeof(buf)表示buf数组的大小,即最大可以读取的数据量。该函数返回读取到的数据的字节数。\[1\]
#### 引用[.reference_title]
- *1* *2* [read和write函数的理解](https://blog.csdn.net/luke_sanjayzzzhong/article/details/100556440)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [高级IO-非阻塞](https://blog.csdn.net/danwuxie/article/details/82889575)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文