Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/bin/sh
Module Name: src
Committed By: kre
Date: Tue Aug 4 22:58:33 UTC 2026
Modified Files:
src/bin/sh: miscbltin.c sh.1
Log Message:
/bin/sh - builtin read command fixes (miscbltin.c)
This corrects a change made in the previous version, where
in addition to the intended change, making a read error be
treated differently than EOF, a change with unplanned
consequences was also made, to treat the EINTR read error
as a "try again" signal, rather than as a read error.
That meant that caught traps no longer interrupted the read,
and while that is how (some) other shells do it (like bash)
it was a change to how our shell does things.
So, now there is (in normal shells) a new -c (continue) option
to cause this behaviour, when given, a trapped signal will be
processed during the wait for input by the read built-in utility,
but not end the read. When absent, the trap will still be processed
while the read is in progress, but will be treated as a read error
(and produce the special (>1) exit code 130.
While doing this, revert all these changes for SMALL shells, they
will return to being essentially identical to what they were
before the previous change. No added -c option, no way to
continue a read if a trapped signal occurs, and a read I/O error
is the same as EOF (as is a trapped signal, EINTR).
To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/bin/sh/miscbltin.c
cvs rdiff -u -r1.279 -r1.280 src/bin/sh/sh.1
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index