Zachary Miller wrote:
> If write() is interrupted by a signal after it successfully writes
> some data, it shall return the number of bytes written.
>
> consider SIGSTOP, which is non-maskable. when the process continues, wouldn't
> this be a situation where the write was interrupted and thus could
> legitimately
> return fewer bytes?
I am going to get myself in trouble by responding from memory instead
of researching and quoting W. Richard Stevens but...
When reading and writing there is a concept of high speed devices and
slow speed devices. As I recall high speed devices include
filesystems (slow speed would be tty devices) and high speed devices
as I recall cannot be interrupted. Therefore as a practical matter
this could never appear when reading or writing a file on a
filesystem. This could only appear when reading or writing a "slow"
device such as a serial port or tty or other. Assuming I recall this
correctly of course.
Bob