- Opens file descriptor, fd.
- Uses fstat(fd) to get information such as size.
-  Set out to read size bytes, i.e. 4096. That would be line 253 of the code linked by @mattdm@mattdm. read_size == 4096- Ask; read: 4096 bytes.
-  A short string is read i.e. 18 bytes. nread == 18
- read_size = read_size - nread (4096 - 18 = 4078)
- Ask; read: 4078 bytes
- 0 bytes read (as first read consumed all bytes in file).
- nread == 0, line 255
-  Unable to read 4096bytes. Zero out buffer.
-  Set error ENODATA.
- Return.
 
- Report error.
- Retry. (Above loop).
- Fail.
- Report error.
- FINE.
                        replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/