⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 read.2

📁 unix v7是最后一个广泛发布的研究型UNIX版本
💻 2
字号:
.TH READ 2 .SH NAMEread \- read from file.SH SYNOPSIS.B read(fildes, buffer, nbytes).br.B char *buffer;.SH DESCRIPTIONA file descriptor is a wordreturned from a successful.I "open, creat, dup,"or.I pipecall..I Bufferis the location of.I nbytescontiguousbytes into which the input will be placed.It is not guaranteedthat all.I nbytesbytes will be read; for exampleif the file refers to a typewriter at most one linewill be returned.In any event the number of characters read is returned..PPIf the returned value is 0, thenend-of-file has been reached..SH "SEE ALSO"open(2), creat(2), dup(2), pipe(2).SH DIAGNOSTICSAs mentioned,0 is returned when the end of the file has been reached.If the read was otherwise unsuccessfulthe return value is \-1.Many conditionscan generate an error:physical I/O errors, bad buffer address,preposterous.I nbytes,file descriptor not that ofan input file..SH ASSEMBLER(read = 3.).br(file descriptor in r0).br.B sys read; buffer; nbytes.br(byte count in r0)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -