Messages in this thread | | | Date | Thu, 02 Oct 2003 10:30:49 -0700 | From | Ulrich Drepper <> | Subject | Re: Who changed /proc/<pid>/ in 2.6.0-test5-bk9? |
| |
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 `---------------------------
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |