coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

prevent seq from inflow on I/O errors


From: Assaf Gordon
Subject: prevent seq from inflow on I/O errors
Date: Mon, 4 Apr 2016 01:18:02 -0400

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


Attachment: 0001-seq-detect-and-report-I-O-errors.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]