Fixing grep -D skip
Xin Li
delphij at delphij.net
Sat Jan 19 00:16:02 UTC 2013
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
On 01/18/13 08:39, John Baldwin wrote:
> On Thursday, January 17, 2013 9:33:53 pm David Xu wrote:
>> I am trying to fix a bug in GNU grep, the bug is if you want to
>> skip FIFO file, it will not work, for example:
>>
>> grep -D skip aaa .
>>
>> it will be stucked on a FIFO file.
>>
>> Here is the patch:
>> http://people.freebsd.org/~davidxu/patch/grep.c.diff2
>>
>> Is it fine to be committed ?
>
> I think the first part definitely looks fine. My guess is the
> non-blocking change is als probably fine, but that should be run
> by the bsdgrep person at least.
I (disclaimer: not bsdgrep person) have just tested that bsdgrep
handle this case just fine.
The non-blocking part is required to make the code function, otherwise
the system will block on open() if fifo don't have another opener.
I'd say "Yes" for this p
Cheers,
- --
Xin LI <delphij at delphij.net> https://www.delphij.net/
FreeBSD - The Power to Serve! Live free or die
a
-----BEGIN PGP SIGNATURE-----
iQEcBAEBCgAGBQJQ+eW5AAoJEG80Jeu8UPuzaPkH/RPnvBg5pDPxmbSXWF3T22s3
XTPNfDns416g6dqig+E+YOhamu+Pz8xFC6JCu3DzPbNcb+OGRh14LBFeZQ6xn648
yxn1j0Y2ZsmjoppMAWg+wuwLtOYX0pK69zZzOxQMepBeA/rkA26hJA/3j6VTPu/X
hLFP+bRy+wt8Ni39PuSrBywuPmwg82de+Fuf8WVVVwXgXHnK+yc/Pb1JWgiU6kzz
r1tyCAh2rXcM4mg++LUoeYZZhrLuxWKKPrXkzGSbz7NSPXJccwf5rx/ZPB2EysVv
Z/CA6wS2jqsOUbyelM01jtvrY6Q6llLIIEc3aGPcjYZbqy/B0VLwyGnR+rElKBo=
=M7oI
-----END PGP SIGNATURE-----
More information about the freebsd-hackers
mailing list