diff options
author | Pádraig Brady <P@draigBrady.com> | 2023-04-22 21:48:51 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2023-04-24 11:46:28 +0100 |
commit | 5595673d5cc2e3939edb898823dfb069296aa5b2 (patch) | |
tree | 5df8c860d337f6b76c5700f41bc20d2d55ac27f0 | |
parent | 0e62ba282ef44567a73f93d77583a838447d7550 (diff) | |
download | coreutils-5595673d5cc2e3939edb898823dfb069296aa5b2.tar.gz |
numfmt: diagnose errors reading the input
* src/numfmt.c (main): Exit with failure upon read errors.
* NEWS: Mention the bug fix.
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | src/numfmt.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -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 2067ca164..3e866dd92 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) |