Query: read
OS: plan9
Section: 2
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
READ(2) System Calls Manual READ(2)NAMEread, readn, write - read or write fileSYNOPSIS#include <u.h> #include <libc.h> long read(int fd, void *buf, long nbytes) long readn(int fd, void *buf, long nbytes) long write(int fd, void *buf, long nbytes)DESCRIPTIONRead reads nbytes bytes of data from the offset in the file associated with fd into memory at buf. The offset is advanced by the number of bytes read. It is not guaranteed that all nbytes bytes will be read; for example if the file refers to the console, at most one line will be returned. In any event the number of characters read is returned. A return value of 0 is conventionally interpreted as end of file. Readn is just like read, but does successive read calls until nbytes have been read, or a read system call returns a non-positive count. Write writes nbytes bytes of data starting at buf to the file associated with fd at the file offset. The offset is advanced by the number of bytes written. The number of characters actually written is returned. It should be regarded as an error if this is not the same as requested.SOURCE/sys/src/libc/9syscall /sys/src/libc/port/readn.cSEE ALSOintro(2), open(2), dup(2), pipe(2)DIAGNOSTICSThese functions set errstr. READ(2)
Related Man Pages |
---|
kvm_read(3) - freebsd |
dirread(2) - plan9 |
read(2) - netbsd |
kvm_read(3) - netbsd |
kvm_write(3) - netbsd |
Similar Topics in the Unix Linux Community |
---|
what can I get the posix standard? |
EIF file |
foreign characters in flat file |
PDKSH dual std input threads |
Tokenise every line read |