[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
0001-seq-detect-and-report-I-O-errors.patch
Description: Binary data
- prevent seq from inflow on I/O errors,
Assaf Gordon <=
- Re: prevent seq from inflow on I/O errors, Pádraig Brady, 2016/04/04
- Re: prevent seq from inflow on I/O errors, Bernhard Voelker, 2016/04/05
- Re: prevent seq from inflow inflow on I/O errors, Assaf Gordon, 2016/04/17
- Re: prevent seq from inflow inflow on I/O errors, Pádraig Brady, 2016/04/17
- Re: prevent seq from inflow inflow on I/O errors, Assaf Gordon, 2016/04/24
- Re: prevent seq from inflow inflow on I/O errors, Assaf Gordon, 2016/04/25
- Re: prevent seq from inflow inflow on I/O errors, Pádraig Brady, 2016/04/26