Re: /proc visibility patch breaks GDB, etc.

From: Peter Chubb
Date: Thu Feb 26 2004 - 15:20:15 EST


>>>>> "David" == David Mosberger <davidm@xxxxxxxxxxxxxxxxx> writes:

>>>>> On Wed, 25 Feb 2004 22:44:10 -0800, Andrew Morton <akpm@xxxxxxxx> said:
Andrew> Peter Chubb <peter@xxxxxxxxxxxxxxxxxx> wrote:
>>
>> The immediate symptom is GDB saying: Could not open
>> /proc/757/status when 757 is a TID not a PID.

Andrew> What does `ls /proc/757' say? Presumably no such file or
Andrew> directory? It's fairly bizare behaviour to be able to open
Andrew> files which don't exist according to readdir, which is why
Andrew> we made that change.

David> Excuse, but this seems seriously FOOBAR. I understand that
David> it's interesting to see the thread-leader/thread relationship,
David> but surely that's no reason to break backwards compatibility
David> and the ability to look up _any_ task's info via /proc/PID/. A
David> program that only wants to show "processes" (thread-group
David> leaders) can simply read /proc/PID/status and ignore the
David> entries for which Tgid != PPid.

Think of scanning /proc on a large SMP machine (e.g., Altix with >512
processors) running lots and lots of multithreaded processes to find
all processes --- like ps(1) does --- and you can see why not
cluttering up /proc with threads is a good idea.


--
Dr Peter Chubb http://www.gelato.unsw.edu.au peterc AT gelato.unsw.edu.au
The technical we do immediately, the political takes *forever*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/