int read(int fd, void *buf, size_t nbyte);
This system call implements the POSIX read function, which reads the next nbyte bytes of data into buf from file descriptor fd.
- The file descriptor to read from.
- The buffer to read data into.
- The total number of bytes to read.
Returns the actual number of bytes read if successful, or -1 on error, in which case errno indicates the error.