Mar-06-2019, 04:35 PM
I'm trying to make a code that searches for an integer inode in the /proc files of the form /proc/pid and returns what files have this integer. When I made the code I did not know /proc couldn't be parsed by normal means (my script returns Errno13 permission denied even with root enabled on qpython3) only now I know there is the pip package "proc" but I have not found much information about this package online and I don't know if it applies here.
Here is where my code freezes
Here is where my code freezes
fds = os.listdir ("/proc/%s/fd" % pid) for fd in fds: if ('socket:[%d]' % inode) == os.readlink ("/proc/%s/fd/%s" % (pid, fd)): print ("%s, " % pid)when I try to create variable fds receiving the list of folders inside "/proc/pid/fd".Anyone knows how to fix it?