From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sc8-sf-mx2-b.sourceforge.net ([10.3.1.12] helo=sc8-sf-mx2.sourceforge.net) by sc8-sf-list1.sourceforge.net with esmtp (Exim 4.30) id 1CPJSg-0001fq-Tt for user-mode-linux-devel@lists.sourceforge.net; Wed, 03 Nov 2004 03:37:58 -0800 Received: from pimout3-ext.prodigy.net ([207.115.63.102]) by sc8-sf-mx2.sourceforge.net with esmtp (Exim 4.41) id 1CPJSf-0002HW-Dv for user-mode-linux-devel@lists.sourceforge.net; Wed, 03 Nov 2004 03:37:58 -0800 From: Chris Wedgwood Message-ID: <20041103113736.GA23041@taniwha.stupidest.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [uml-devel] [PATCH] UML: Use PTRACE_KILL instead of SIGKILL to kill host-OS processes Sender: user-mode-linux-devel-admin@lists.sourceforge.net Errors-To: user-mode-linux-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Id: The user-mode Linux development list List-Post: List-Help: List-Subscribe: , List-Archive: Date: Wed, 3 Nov 2004 03:37:36 -0800 To: Jeff Dike Cc: Blaisorblade , user-mode-linux-devel@lists.sourceforge.net, Andrew Morton , LKML kill(..., SIGKILL) doesn't work to kill host-OS processes created in the exec path in TT mode --- for this we need PTRACE_KILL (it did work in previous kernels, but not by design). Without this process will accumulate on the host-OS (although the won't be visible inside UML). Signed-off-by: Chris Wedgwood --- Yes, there are other fixes along these lines which are needed but one at a time as we test these... Index: cw-current/arch/um/kernel/tt/exec_user.c =================================================================== --- cw-current.orig/arch/um/kernel/tt/exec_user.c 2004-11-03 02:10:18.064830204 -0800 +++ cw-current/arch/um/kernel/tt/exec_user.c 2004-11-03 02:12:10.447716745 -0800 @@ -35,7 +35,8 @@ tracer_panic("do_exec failed to get registers - errno = %d", errno); - kill(old_pid, SIGKILL); + if (ptrace(PTRACE_KILL, old_pid, NULL, NULL)) + printk("Warning: ptrace(PTRACE_KILL, %d, ...) saw %d\n", errno); if(ptrace_setregs(new_pid, regs) < 0) tracer_panic("do_exec failed to start new proc - errno = %d", ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel