From 242689c7f93de72693979f877dd31b3ef7178eea Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 28 Sep 2009 18:29:02 +0200 Subject: ls: with -LR, exit with status 2 upon detecting a cycle * src/ls.c (print_dir): Diagnosing the cycle is not enough. Also set exit status to 2. This is what Solaris' /bin/ls does, too. * tests/ls/infloop: Rework test: match both expected stdout and stderr. Require an exit status of 2 in this case. * doc/coreutils.texi (ls invocation): Mention that a loop provokes in an exit status of 2. * NEWS (Bug fixes): Mention it. Reported by Yang Ren in http://bugzilla.redhat.com/525402. * THANKS: Correct ordering of Yang Ren's names. --- doc/coreutils.texi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/coreutils.texi b/doc/coreutils.texi index b10cc100c..5026e7607 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -6113,8 +6113,9 @@ Exit status: 1 minor problems (e.g., failure to access a file or directory not specified as a command line argument. This happens when listing a directory in which entries are actively being removed or renamed.) -2 serious trouble (e.g., memory exhausted, invalid option or failure - to access file or directory specified as a command line argument) +2 serious trouble (e.g., memory exhausted, invalid option, failure + to access a file or directory specified as a command line argument + or a directory loop) @end display Also see @ref{Common options}. -- cgit v1.2.3-70-g09d2