Skip to content

why does running rg with sudo on / cause my Linux system to hang? #2897

Answered by BurntSushi
bluescorpion35 asked this question in Q&A
Discussion options

You must be logged in to vote

This is generally expected behavior. Linux exposes special files in /proc where even the mere act of reading them can cause side effects, including system hangs or reboots.

The suggestion to ignore /proc by default is interesting, but I don't think it's viable to do that at this stage in ripgrep's life. ripgrep's smart filtering by default is already surprising in some respects, and adding more special cases isn't really something I'm willing to do. You can work around this by adding a /.rgignore to your system excluding /proc. You might also want to exclude /dev and /sys.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@bluescorpion35
Comment options

Answer selected by BurntSushi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2896 on September 18, 2024 21:13.