Re: Who changed /proc// in 2.6.0-test5-bk9?

Jamie Lokier
2003-10-03T02:54:38Z

Linus Torvalds wrote:
> And it may or may not make sense to not have a "/proc/<nn>/task/<yy>/fd"
> directory at all if the thread shares file descriptors with the thread
> group leader. That would be a fairly easy optimization.

If you make /proc/.../fd return the same inode numbers for the
identical file descriptor tables, that would be just as good for fuser
performance.

fuser would stat() each of the /proc/<nn>/task/<yy>/fd entries and see
that they're the same as the group leader.

It is the same number of operations as checking for the non-existence
of /proc/<nn>/task/<yy>/fd entries, but more flexible.

Alternatively you could make the task fd directories be symbolic
links to the group leader fd directory.

-- Jamie