Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 5 Sep 2002 18:30:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 5 Sep 2002 18:30:04 -0400 Received: from mx1.elte.hu ([157.181.1.137]:16784 "HELO mx1.elte.hu") by vger.kernel.org with SMTP id ; Thu, 5 Sep 2002 18:30:03 -0400 Date: Fri, 6 Sep 2002 00:39:02 +0200 (CEST) From: Ingo Molnar Reply-To: Ingo Molnar To: Daniel Jacobowitz Cc: OGAWA Hirofumi , Linus Torvalds , Subject: Re: [patch] ptrace-fix-2.5.33-A1 In-Reply-To: <20020905222947.GA13667@nevyn.them.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1422 Lines: 32 On Thu, 5 Sep 2002, Daniel Jacobowitz wrote: > If we want to do this then we'd need to fix up every ptrace > implementation in every architecture to call the appropriate function; > it's a separate problem. which code relies on having debugged children only in the ->children list and not in the ->ptrace_children list? > > i'm not sure about this either. What happens if an (untraced) parent has > > traced and untraced children, and does a wait4. Would it confuse the > > debugger if the parent could get one of the traced tasks as a result in > > wait4? And how does the debugger solve this problem? > > Well, it seems to me that when a traced task has an event, it should be > reported first to the debugger - for signals this happens in do_signal - > and then possibly to the normal parent. But I'm not sure if this > actually happens right now or not. Worth investigating some more. it just cannot happen. There are only two kinds of events passed via wait4: tracing related and exit related. An exiting task is not traced anymore. And two tasks cannot trace the same task - so it can never happen that wait4 wants to look at ->ptrace_children for events. Ingo - 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/