On Thu, Jun 19, 2014 at 4:23 AM, Pádraig Brady <[email protected]> wrote: > On 12/18/2013 05:39 PM, Eric Blake wrote: >> On 12/18/2013 09:46 AM, Jeff Kirkpatrick wrote: >>> However, I don't see explicit reasons for the non-zero exit code. If you >>> want to ask for the reason, you may write an emailto [email protected]." >>> >>> Can anyone elaborate on why the decision to use a non-zero exit code? >> >> Because POSIX requires a non-zero exit code any time an error message is >> output, including when a directory is skipped due to a directory loop. >> >> http://pubs.opengroup.org/onlinepubs/9699919799/utilities/du.html > > We suppress the cycle warning when following symlinks > as it's not an error in that case. > Similarly we should suppress the cycle warning for bind mounts > as it's not an error in that case either. > Hence I propose the attached to avoid the exit failure in this case. > > I'm not considering other tools that emit_cycle_warning() yet, > as they're less likely to be used in such cases.
That looks perfect. Thanks!
