]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
numfmt: diagnose errors reading the input
authorPádraig Brady <P@draigBrady.com>
Sat, 22 Apr 2023 20:48:51 +0000 (21:48 +0100)
committerPádraig Brady <P@draigBrady.com>
Mon, 24 Apr 2023 10:46:28 +0000 (11:46 +0100)
* src/numfmt.c (main): Exit with failure upon read errors.
* NEWS: Mention the bug fix.

NEWS
src/numfmt.c

diff --git a/NEWS b/NEWS
index 2c68b1735f26987632cff9c14c369f161f24b8a3..ec4920edc6463c9eb86574d3c685ec7c72cb3ed9 100644 (file)
--- 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".]
 
 
index 2067ca164fc3d3de037904ad1f78cbc03ff55191..3e866dd92b5d71df10b1eca67edae69395388d30 100644 (file)
@@ -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)