Norman Wilson <norman(a)oclsc.org> wrote:
Sometime in the latter days of the Research system (somewhere
between when the 9/e and 10/e manuals were published), I had
an inspiration about that, and changed things as follows:
When a system call like read is interrupted by a signal:
-- If no characters have been copied into the user's
buffer yet, return -1 and set errno to EINTR (as would
always have been done in Heritage UNIX).
-- If some data has already been copied out, return the
number of characters copied.
Weird, I thought what you describe was the traditional behaviour, e.g.
https://www.freebsd.org/cgi/man.cgi?query=read&sektion=2&manpath=4.…
https://www.freebsd.org/cgi/man.cgi?query=read&sektion=2&manpath=Su…
both say you only get EINTR if nothing was read. (This detail seems to go
back to the 4.1c manual.) Was this a BSDism?
Tony.
--
f.anthony.n.finch <dot(a)dotat.at>
http://dotat.at/ - I xn--zr8h punycode
Thames, Dover, Wight, Portland, Plymouth: West or southwest 6 to gale 8.
Moderate or rough. Occasional drizzle. Moderate occasionally poor.