From: Daniel Jacobowitz <dan@debian.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>,
Linus Torvalds <torvalds@transmeta.com>,
linux-kernel@vger.kernel.org
Subject: Re: [patch] ptrace-fix-2.5.33-A1
Date: Thu, 5 Sep 2002 18:15:58 -0400 [thread overview]
Message-ID: <20020905221558.GA12837@nevyn.them.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0209060009280.11747-100000@localhost.localdomain>
On Fri, Sep 06, 2002 at 12:09:51AM +0200, Ingo Molnar wrote:
>
> On Thu, 5 Sep 2002, Daniel Jacobowitz wrote:
>
> > There's definitely still something wrong... let me just run through my
> > understanding of these lists, to make sure we're on the same page.
> >
> > tsk->children: tsk's children, which are either untraced or traced by
> > tsk. They have p->parent == p->real_parent == tsk.
> > Chained in p->sibling.
>
> no - the way i wrote it originally was that only untraced children should
> be on the tsk->children list. Traced tasks will be on the debugger's
> ->children list, plus will be on the real parent's ->ptrace_children list.
Right - let me rephrase. Tasks which are either:
- untraced, normal
- traced, but traced _by their parent_
are on the sibling/children list.
Tasks which are traced by some not-my-parent process go on the
ptrace_children list. So I think we agree.
> > tsk->ptrace_children: tsk's children, which are traced by some other
> > process. They have p->real_parent == tsk and p->parent != tsk.
> > Chained in p->ptrace_list.
>
> yes. This means that the sum of the two lists gives the real, total set of
> children.
>
> this splitup of the lists makes it possible for the debugger to do a wait4
> that will get events from the debugged task, and for the debugged task to
> also be available to the real parent.
Great. I'm not exactly sure on how this works right now: sys_wait4
only iterates over ->children, with the exception of the special code
in TASK_ZOMBIE. I'm not quite sure when events from a traced process
get to the normal parent of that process, or when they're supposed to.
> is this really what we want?
>
> (note that the meaning of the lists is not necesserily cleanly expressed
> via the code, all deviations are most likely bugs.)
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2002-09-05 22:12 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-05 22:09 [patch] ptrace-fix-2.5.33-A1 Ingo Molnar
2002-09-05 22:15 ` Daniel Jacobowitz [this message]
2002-09-05 22:25 ` Ingo Molnar
2002-09-05 22:29 ` Daniel Jacobowitz
2002-09-05 22:39 ` Ingo Molnar
2002-09-05 22:50 ` Daniel Jacobowitz
2002-09-05 22:58 ` Ingo Molnar
2002-09-06 15:27 ` OGAWA Hirofumi
2002-09-06 15:45 ` Daniel Jacobowitz
2002-09-06 15:57 ` Ingo Molnar
2002-09-06 20:44 ` OGAWA Hirofumi
2002-09-05 22:41 ` Ingo Molnar
2002-09-05 22:52 ` Daniel Jacobowitz
2002-09-05 22:35 ` Ingo Molnar
2002-09-05 23:02 ` Daniel Jacobowitz
2002-09-05 23:08 ` Ingo Molnar
-- strict thread matches above, loose matches on Subject: below --
2002-09-05 22:10 Ingo Molnar
2002-09-05 15:35 Ingo Molnar
2002-09-05 17:08 ` OGAWA Hirofumi
2002-09-05 18:36 ` Daniel Jacobowitz
2002-09-05 20:06 ` Ingo Molnar
2002-09-05 21:44 ` Daniel Jacobowitz
2002-09-05 22:12 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020905221558.GA12837@nevyn.them.org \
--to=dan@debian.org \
--cc=hirofumi@mail.parknet.co.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.