Reputation: 1556
Just looking for where this is handled. I have a similar need to track open fd's without scanning the /proc system.
Upvotes: 0
Views: 103
Reputation: 66278
The code which fill information under /proc/<PID>/fd
is in file fs/proc/fd.c.
I suggest to look into the function proc_readfd_common
, which iterates over the file descriptors available for the process. This function is eventually called when directory /proc/<PID>/fd
is read.
Upvotes: 2