Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grep hangs indefinitely on FIFO files #523

Open
firasuke opened this issue Oct 17, 2024 · 4 comments
Open

grep hangs indefinitely on FIFO files #523

firasuke opened this issue Oct 17, 2024 · 4 comments

Comments

@firasuke
Copy link
Contributor

Hey there,

Thank you for your time and effort on toybox!

I came across the following behavior when using toybox grep. It appears to freeze or stall indefinitely when the file is a FIFO (named pipe).

To reproduce this issue, simply create a fifo file in a directory:

mkfifo -m 600 namedPipe

Then attempt to run toybox grep -rnw . -e "some expression" (in the directory where the namedPipe exists in or in one of its subdirectories) and it will freeze indefinitely.

Please note that both GNU grep and ugrep do not suffer from this issue (it is possible that they are skipping these special files entirely by default?).

Thanks in advance!

@landley
Copy link
Owner

landley commented Oct 20, 2024 via email

@enh-google
Copy link
Collaborator

enh-google commented Oct 22, 2024 via email

@landley
Copy link
Owner

landley commented Oct 22, 2024 via email

@enh-google
Copy link
Collaborator

enh-google commented Oct 22, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants