eminence / procfs

Rust library for reading the Linux procfs filesystem
Other
362 stars 106 forks source link

Don't error if the oppportunistic statat fails in fd_count #247

Closed eminence closed 1 year ago

eminence commented 1 year ago

It was reported (#241) that old kernels (2.6) will return a failure if SYMLINK_NOFOLLOW is used, so lets check for errors here.

eminence commented 1 year ago

@bobrik does this look OK to you?

bobrik commented 1 year ago

I think we can also just not pass any flags (pass AtFlags::empty()) and that would work too and be easier to follow.

eminence commented 1 year ago

Ah, good point. I somehow had it in my head that the SYMLINK_NOFOLLOW part was relevant here, but that's not true. So AtFlags::empty() sounds like the way to go here. Thanks