[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: minor bug in bash
From: |
Bob Proulx |
Subject: |
Re: minor bug in bash |
Date: |
Tue, 17 Jan 2012 23:42:09 -0700 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
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