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

Do not fail proc_basic_info if status isn't readable on AIX #1978

Closed
wants to merge 5 commits into from

Conversation

albertvaka
Copy link

Summary

  • OS: AIX
  • Bug fix: No
  • Type: Error handling
  • Fixes: N/A

Description

On AIX, /proc/<pid>/status might have more restrictive permissions
than /proc/<pid>/psinfo. If only the later can be accessed, we can
still return most of the information instead of failing.

On AIX, `/proc/<pid>/status` might have more restrictive permissions
than `/proc/<pid>/psinfo`. If only the later can be accessed, we can
still return most of the information instead of failing.
@giampaolo
Copy link
Owner

Historically we don't swallow "access denied" when it happens. We let it propagate. Usually it happens for PIDs owned by other users (root).

@albertvaka
Copy link
Author

Makes total sense. It's a pity that we fail the entire method just because one field couldn't be returned, but I agree that swallowing the error isn't good either. I'll close this, thanks for your feedback :)

Maybe the best solution would be to split the information coming from two different places in two different methods, so we don't fail when we only need the stuff we can access, but that needs a bigger refactor.

@albertvaka albertvaka closed this Aug 10, 2021
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

Successfully merging this pull request may close these issues.

None yet

2 participants