From: Pádraig Brady Date: Sat, 18 Dec 2010 03:25:49 +0000 (+0000) Subject: wc: fix a possible hang with --files0-from X-Git-Tag: v8.8~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0eaa993ae64d75c7b9da62c99e9e5f617b6a248d;p=thirdparty%2Fcoreutils.git 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 --- diff --git a/src/wc.c b/src/wc.c index a1922baf9f..ae29f10547 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 ();