Home - Waterfall Grid T-Grid Console Builders Recent Builds Buildslaves Changesources - JSON API - About

Change #261915

Category gcoreutils
Changed by Collin Funk <collin.funk1ohnoyoudont@gmail.com>
Changed at Sat 21 Mar 2026 20:10:59
Repository git://git.savannah.gnu.org/coreutils.git
Project gcoreutils
Branch master
Revision 30a5cbec0efc2941513c5f51652fb851b7b87bba

Comments

tac: promptly diagnose write errors
This patch also fixes a bug where 'tac' would print a vague error on
some inputs:

    $ seq 10000 | ./src/tac-prev > /dev/full
    tac-prev: write error
    $ seq 10000 | ./src/tac > /dev/full
    tac: write error: No space left on device

In this case ferror (stdout) is true, but errno has been set back to
zero by a successful fclose (stdout) call.

* src/tac.c (output): Call write_error() if fwrite fails.
* tests/misc/io-errors.sh: Check that 'tac' prints a detailed write
error.
* NEWS: Mention the improvement.

Changed files