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

Ulrich Drepper
2003-10-02T17:31:25Z

Albert Cahalan wrote:

> To the user, maybe. To the admin, no. The admin uses
> fuser and/or lsof to find out why he can't umount.
> If those programs were thread-aware (they are not),
> then they could take many minutes to run.
>
> In other words, stuff runs faster if we can ban this.
> If not, please suggest a way to make fuser and lsof fast.

Don't you see the flaw in your argumentation?

If lsof/fuser don't always handle this situation correctly you provide a
way for some ill-minded person to hide file descriptors from the view of
sysadmins etc. You in any case have to handle this case.

It should be possible for a program to easily check whether

/proc/PID/fd
and
/proc/self/fd

are the same directory. If not, add support for that. Then those
programs only need to iterate over the fd directories and check whether
they are the same.

--
--------------. ,-. 444 Castro Street
Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA
Red Hat `--' drepper at redhat.com `---------------------------