* src/factor.c (do_stdin): Exit with failure upon read errors.
* NEWS: Mention the bug fix.
Previously such file names would have caused the strip process to fail.
[This bug was present in "the beginning".]
- tsort and numfmt now diagnose read errors on the input.
+ factor, numfmt, and tsort now diagnose read errors on the input.
[This bug was present in "the beginning".]
size_t token_length = readtoken (stdin, DELIM, sizeof (DELIM) - 1,
&tokenbuffer);
if (token_length == (size_t) -1)
- break;
+ {
+ if (ferror (stdin))
+ die (EXIT_FAILURE, errno, _("error reading input"));
+ break;
+ }
+
ok &= print_factors (tokenbuffer.buffer);
}
free (tokenbuffer.buffer);