mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* comment "ptrace_list" and "children" members
@ 2004-07-28 17:26 David Mosberger
  2004-07-28 17:30 ` Roland McGrath
  0 siblings, 1 reply; 2+ messages in thread
From: David Mosberger @ 2004-07-28 17:26 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, roland

A while ago I had a "fun" time sorting out how the "ptrace_children"
and the "children" lists are being used.  I think the two little
comments would help making that process a lot easier (they're based on
an earlier email by Roland).

	--david

Document the purpose of the "ptrace_list/ptrace_children" and
"children/sibling" lists.

Signed-off-by: davidm@hpl.hp.com

===== include/linux/sched.h 1.179 vs edited =====
--- 1.179/include/linux/sched.h	2004-07-06 22:19:25 -07:00
+++ edited/include/linux/sched.h	2004-07-20 21:57:10 -07:00
@@ -410,6 +410,10 @@
 	unsigned int time_slice, first_time_slice;
 
 	struct list_head tasks;
+	/*
+	 * ptrace_list/ptrace_children forms the list of my children
+	 * that were stolen by a ptracer.
+	 */
 	struct list_head ptrace_children;
 	struct list_head ptrace_list;
 
@@ -431,6 +435,10 @@
 	 */
 	struct task_struct *real_parent; /* real parent process (when being debugged) */
 	struct task_struct *parent;	/* parent process */
+	/*
+	 * children/sibling forms the list of my children plus the
+	 * tasks I'm ptracing.
+	 */
 	struct list_head children;	/* list of my children */
 	struct list_head sibling;	/* linkage in my parent's children list */
 	struct task_struct *group_leader;	/* threadgroup leader */

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: comment "ptrace_list" and "children" members
  2004-07-28 17:26 comment "ptrace_list" and "children" members David Mosberger
@ 2004-07-28 17:30 ` Roland McGrath
  0 siblings, 0 replies; 2+ messages in thread
From: Roland McGrath @ 2004-07-28 17:30 UTC (permalink / raw)
  To: davidm; +Cc: akpm, linux-kernel

> A while ago I had a "fun" time sorting out how the "ptrace_children"
> and the "children" lists are being used.  I think the two little
> comments would help making that process a lot easier (they're based on
> an earlier email by Roland).

Last time I debugged a ptrace-related bug, I too spent a good little while
going in circles because I couldn't keep track from day to day how those
lists were being used.  Those comments would help at least some.


Thanks,
Roland

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-07-28 17:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-28 17:26 comment "ptrace_list" and "children" members David Mosberger
2004-07-28 17:30 ` Roland McGrath

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®