From: Pádraig Brady Date: Sat, 22 Apr 2023 20:48:51 +0000 (+0100) Subject: numfmt: diagnose errors reading the input X-Git-Tag: v9.4~156 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5595673d5cc2e3939edb898823dfb069296aa5b2;p=thirdparty%2Fcoreutils.git numfmt: diagnose errors reading the input * src/numfmt.c (main): Exit with failure upon read errors. * NEWS: Mention the bug fix. --- diff --git a/NEWS b/NEWS index 2c68b1735f..ec4920edc6 100644 --- a/NEWS +++ b/NEWS @@ -11,7 +11,7 @@ GNU coreutils NEWS -*- outline -*- Previously such file names would have caused the strip process to fail. [This bug was present in "the beginning".] - tsort now diagnoses read errors on the input. + tsort and numfmt now diagnose read errors on the input. [This bug was present in "the beginning".] diff --git a/src/numfmt.c b/src/numfmt.c index 2067ca164f..3e866dd92b 100644 --- a/src/numfmt.c +++ b/src/numfmt.c @@ -1644,7 +1644,7 @@ main (int argc, char **argv) } if (ferror (stdin)) - error (0, errno, _("error reading input")); + die (EXIT_FAILURE, errno, _("error reading input")); } if (debug && !valid_numbers)