Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S266249AbUITLRl (ORCPT ); Mon, 20 Sep 2004 07:17:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S266263AbUITLRl (ORCPT ); Mon, 20 Sep 2004 07:17:41 -0400 Received: from asplinux.ru ([195.133.213.194]:32527 "EHLO relay.asplinux.ru") by vger.kernel.org with ESMTP id S266249AbUITLRi (ORCPT ); Mon, 20 Sep 2004 07:17:38 -0400 Message-ID: <414EBF2B.5090909@sw.ru> Date: Mon, 20 Sep 2004 15:29:47 +0400 From: Kirill Korotaev User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.2.1) Gecko/20030426 X-Accept-Language: ru-ru, en MIME-Version: 1.0 To: linux-kernel@vger.kernel.org Subject: [Q] why switch_exec_pids() changes thread group leader pid? Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 708 Lines: 20 Hello, 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. Am I wrong? Kirill - 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/