Author: gabor Date: Mon Nov 28 20:04:26 2011 New Revision: 228097 URL: http://svn.freebsd.org/changeset/base/228097
Log: - Call warnx() instead of errx() if a directory is not readable when using a recursive search. This is the expected behavior instead of aborting. PR: bin/162907 Submitted by: Jan Beich <jbe...@tormail.net> MFC after: 3 days Modified: head/usr.bin/grep/util.c Modified: head/usr.bin/grep/util.c ============================================================================== --- head/usr.bin/grep/util.c Mon Nov 28 20:03:33 2011 (r228096) +++ head/usr.bin/grep/util.c Mon Nov 28 20:04:26 2011 (r228097) @@ -130,7 +130,9 @@ grep_tree(char **argv) case FTS_DNR: /* FALLTHROUGH */ case FTS_ERR: - errx(2, "%s: %s", p->fts_path, strerror(p->fts_errno)); + notfound = true; + if(!sflag) + warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); break; case FTS_D: /* FALLTHROUGH */ _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"