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

Does Proc::Interrupts() have a broken interface? #498

Open
danobi opened this issue Mar 9, 2023 · 3 comments
Open

Does Proc::Interrupts() have a broken interface? #498

danobi opened this issue Mar 9, 2023 · 3 comments

Comments

@danobi
Copy link

danobi commented Mar 9, 2023

It looks like /proc/interrupts support was added in #475 .

But it's unclear how this interface works or if it ever worked.

For example:

  • Interrupts() calls into p.path() to get the path to the interrupts file
  • But p.path() prepends a pid to the path

/proc/<pid>/interrupts does not exist. There is only /proc/interrupts.

@rexagod
Copy link
Contributor

rexagod commented Mar 21, 2024

/proc/foo is associated with the kernel (all files one level under /proc). On an fresh docker container, with no userland processes running, find /proc -maxdepth 2 -name foo will return nothing for the second level, but doing a sleep 100& followed by cat /proc/$(pgrep sleep)/foo will show you the details about foo associated with the process of PID $(pgrep sleep).

I believe this can be closed now.

@SuperQ
Copy link
Member

SuperQ commented Jul 30, 2024

This is actually a bug. It should probably be p.proc.Path().

@rexagod
Copy link
Contributor

rexagod commented Aug 13, 2024

I believe I assumed the issue to only target /proc/<pid>/interrupts, rather than /proc/interrupts too, my bad. We do support the former, but not the latter, as @SuperQ pointed out above. I'll patch this up. :)

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