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

ack can get blocked by files #549

Closed
Sworddragon opened this issue Apr 22, 2015 · 9 comments
Closed

ack can get blocked by files #549

Sworddragon opened this issue Apr 22, 2015 · 9 comments

Comments

@Sworddragon
Copy link

Initially this issue was reported here: https://bugs.launchpad.net/ubuntu/+source/ack-grep/+bug/1267948
It is still reproducible with ack 2.14 and I'm assuming that it just hit a file that waits for input. Maybe ack should check for such files and then skip them.

@petdance
Copy link
Collaborator

What does grep do in such a situation?

@Sworddragon
Copy link
Author

Grep does wait too.

@petdance
Copy link
Collaborator

If grep has the same problem, then I don't know that ack will be able to do any better.

@Sworddragon
Copy link
Author

If I'm not wrong telling the file position should always fail on such files without blocking. This could be used as a way to detect such files.

@Sworddragon
Copy link
Author

Just a little notice: I have now also opened a ticket for this for grep on Launchpad: https://bugs.launchpad.net/ubuntu/+source/grep/+bug/1447216

@hoelzro
Copy link
Collaborator

hoelzro commented Apr 22, 2015

Related: #214 #481

@xtaran
Copy link

xtaran commented Apr 22, 2015

I don't think this needs to be fixed at all because it is no bug but just how Linux works. Grepping through whole /proc just doesn't make sense as all files in there are special and only have some file-ish properties.

@Sworddragon
Copy link
Author

/proc was just an example but such files can appear at any location (for example the text editor SciTE is storing such a file in /tmp if opened).

@petdance
Copy link
Collaborator

petdance commented Jun 9, 2016

Thanks for the input. I'm closing this as acceptable.

@petdance petdance closed this as completed Jun 9, 2016
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

4 participants