<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/tests/misc/seq-io-errors.sh, branch v8.26</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v8.26</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v8.26'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2016-04-24T22:19:50Z</updated>
<entry>
<title>seq: detect and report I/O errors immediately</title>
<updated>2016-04-24T22:19:50Z</updated>
<author>
<name>Assaf Gordon</name>
<email>assafgordon@gmail.com</email>
</author>
<published>2016-04-17T06:28:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=c92585b10b29ce2c31c69cea52e69ef053c9679f'/>
<id>urn:sha1:c92585b10b29ce2c31c69cea52e69ef053c9679f</id>
<content type='text'>
Ensure I/O errors are detected (and terminate seq), preventing seq
from infloop (or running for long time with a large
range) upon write errors or ignored SIGPIPE. Examples:

     seq 1 inf &gt; /dev/full             (seq_fast)
     seq 1.1 0.1 inf &gt;/dev/full        (print_numbers)

* src/seq.c (io_error): A new function to diagnose appropriate
stdio errors and exit the program with failure status.
(seq_fast, print_numbers): Explicitly check for write errors
and terminate the program with diagnostic.
* tests/misc/seq-io-errors.sh: Test error detection with /dev/full.
* tests/misc/seq-epipe.sh: Test error detection with broken pipes.
* tests/local.mk: Add new tests.
* NEWS: Mention the fix.
</content>
</entry>
</feed>
