wc: fix a possible hang with --files0-from

* src/wc.c (main): exit when we get a read error on
the --files0-from file, rather than retrying and
spinning the CPU
This commit is contained in:
Pádraig Brady committed 2010-12-19 00:40:27 +00:00
1 parent e66948c3b5
commit 0eaa993ae6
1 file changed
+2 -2
+2 -2
View File
@@ -726,8 +726,8 @@ main (int argc, char **argv)
switch (ai_err)
{
case AI_ERR_READ:
error (0, errno, _("%s: read error"), quote (files_from));
skip_file = true;
error (EXIT_FAILURE, errno, _("%s: read error"),
quote (files_from));
continue;
case AI_ERR_MEM:
xalloc_die ();