[Bug 11626] New: Recursive grep hangs when encountering a named pipe
bugzilla at busybox.net
bugzilla at busybox.net
Mon Jan 21 20:25:00 UTC 2019
https://bugs.busybox.net/show_bug.cgi?id=11626
Bug ID: 11626
Summary: Recursive grep hangs when encountering a named pipe
Product: Busybox
Version: unspecified
Hardware: All
OS: Other
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at busybox.net
Reporter: whitedavidp at yahoo.com
CC: busybox-cvs at busybox.net
Target Milestone: ---
I am using BB 1.29.2 on Android and recently encountered a situation when a
recursive grep command was hanging. I discovered that in the folder/file tree
being recursed there were several files which ls -l shows having a file type of
"p", named pipe.
I can understand why this might cause a problem. But it seems that it might be
a good idea for grep to check the file type and not even attempt to
open/process such files. One would think that this would at least create a file
open/read error given that there is the -s option for suppressing output of
this nature. But all I get is a hung grep that must be manually killed.
I know how to avoid this using something like this:
find . -type f -exec grep pattern {}
But this seems far less efficient than having grep the files it intends to try
and open.
Thanks very much!
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list