summaryrefslogtreecommitdiff
path: root/src/wc.c
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2010-12-18 03:25:49 +0000
committerPádraig Brady <P@draigBrady.com>2010-12-19 00:40:27 +0000
commit0eaa993ae64d75c7b9da62c99e9e5f617b6a248d (patch)
treef6c8c108faa2d0e36b91576d662d7843bae6da9e /src/wc.c
parente66948c3b59045bf8b9f6bd1e0dcc3bb93488cab (diff)
downloadcoreutils-0eaa993ae64d75c7b9da62c99e9e5f617b6a248d.tar.xz
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
Diffstat (limited to 'src/wc.c')
-rw-r--r--src/wc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wc.c b/src/wc.c
index a1922baf9..ae29f1054 100644
--- a/src/wc.c
+++ b/src/wc.c
@@ -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 ();