When we call read(fd, buf, count)
on Linux, can the return value of the system (function) call be less than count other than the scenario where there were fewer bytes to the end-of-file?
I looked it up in the man page, it says
"On success, the number of bytes read is returned (zero indicates end of file), and the file position is advanced by this
number. It is not an error if this number is smaller than the number of bytes requested; this may happen for example
because fewer bytes are actually available right now (maybe because we were close to end-of-file, or because we are reading
from a pipe, or from a terminal), or because read()
was interrupted by a signal."
So here is my question:
How can read()
on a regular file be interrupted by a signal? By what possible signals?