📄 read.2
字号:
.th READ II 8/5/73.sh NAMEread \*- read from file.sh SYNOPSIS(read = 3.).br(file descriptor in r0).ft B.brsys read; buffer; nbytes.br.s3read(fildes, buffer, nbytes).brchar *buffer;.ft R.sh DESCRIPTIONA file descriptor is a wordreturned from a successful.it "open, creat, dup,"or.it pipecall..it Bufferis the location of.it nbytescontiguousbytes into which the input will be placed.It is not guaranteedthat all.it 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(in r0)..s3If the returned value is 0, thenend-of-file has been reached..sh "SEE ALSO"open (II), creat (II), dup (II), pipe (II).sh DIAGNOSTICSAs mentioned,0 is returned when the end of the file has been reached.If the read was otherwise unsuccessfulthe error bit (c-bit) is set.Many conditionscan generate an error:physical I/O errors, bad buffer address,preposterous.it nbytes,file descriptor not that ofan input file.From C, a \*-1 return indicates the error.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -