read() on dirs - grep

Daniel Braniss danny at cs.huji.ac.il
Tue Aug 10 06:40:21 UTC 2010


> Em 2010.08.09. 21:34, Gennady Proskurin escreveu:
> > I see misbehaviour of new bsd grep in freebsd on tmpfs when grepping dirs.
> > For example (on tmpfs /tmp):
> >
> > mkdir /tmp/qwe
> > grep something /tmp/qwe
> > (grep hangs)
> >    
> Thank you for the report, I'm already aware of the issue and preparing a 
> fix for it.
> 
just in case this is the same but different :-)
if grep hits an NFS mounted dir it goes into a loop:
truss grep  -l '^# PROVIDE:' /cs/share/etc/rc.d/*
	...
	read(2,0x800c5e000,4096)                         ERR#21 'Is a directory'
	...
cheers,
	danny




More information about the freebsd-current mailing list