Date: Mon, 29 Apr 2024 09:02:42 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 237873] Inconsistent behavior between the program and its man page bsdgrep(1) Message-ID: <bug-237873-227-4Kl38BFmcA@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-237873-227@https.bugs.freebsd.org/bugzilla/> References: <bug-237873-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D237873 --- Comment #5 from WHR <msl0000023508@gmail.com> --- > It seems that the -p option does not work in bsdgrep By digging futher into the source code, it appears that bsdgrep(1) simply translates its 'LINK_SKIP' for '-p' into 'FTS_PHYSICAL' flag for fts_open(3= ); after that it didn't have any special handling for symbolic links. Thus for= any symbolic link found by fts_read(3) will be followed in function 'procfile'. It should have cases for 'FTS_SL' and 'FTS_SLNONE' to filter out symbolic l= inks in case of 'LINK_SKIP', in this 'switch': https://cgit.freebsd.org/src/tree/usr.bin/grep/util.c?id=3De116e040f3091eca= 914a06dcd0bdd9f1aea23add#n155 --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-237873-227-4Kl38BFmcA>