Hello, The attached patch add I/O error checking to seq, preventing infloop on certain write-error conditions.
The typical case is
seq 1 inf > /dev/full
but also a more rare case is of systems with SIGPIPE set to ignore by default
(same weird system in recent grep thread:
http://lists.gnu.org/archive/html/bug-grep/2016-03/msg00025.html ).
On that weird system, commands like 'seq 999999 inf | head -n2' would run
forever because SIGPIPE is ignored, and seq did not check for errors. (This
exact command is found in ./tests/misc/seq-precision.sh).
Comments and feedback welcomed,
regards,
- assaf
0001-seq-detect-and-report-I-O-errors.patch
Description: Binary data
