On Mon, Sep 20, 2004 at 03:29:47PM +0400, Kirill Korotaev wrote:Heh, rare doesn't mean correct, yeah? :)
I've been looking through switch_exec_pids() function and found that it changes thread group leader PID/TGID. Is it really a good idea to change pid of the process during it's lifetime? I could understand if it was happenning in the context of that process, but pid changes everytime a thread calls do_execve().
As far as I can see, leader doesn't have to do any of detach_pid()'s. Instead thread should change it's PID/TGID.
It's only done when a thread that is not a thread group leader
execve()'s. This is actually pretty rare and confined to threaded
applications, so it should be almost never called.