read (system call)
From Wikipedia, the free encyclopedia
In modern POSIX compliant operating systems, a program that needs to access data from a file stored in a file system uses the read system call. The file is identified by a file descriptor that is normally obtained from a previous call to open. This system call reads in data in bytes, the number of which is specified by the caller, from the file and stores then into a buffer supplied by the calling process.
This article includes a list of references, related reading, or external links, but its sources remain unclear because it lacks inline citations. (February 2019) |
The read system call takes three arguments:
- The file descriptor of the file.
- the buffer where the read data is to be stored and
- the number of bytes to be read from the file.