Skip site navigation (1)Skip section navigation (2)


| 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?>