Beginner's Q

David Rysdam (drysdam@az.com)
Wed, 28 Oct 1998 21:02:20 -0800


Hi everyone.

I'm relatively new to Linux and very very very new to the "raw kernel",
so please don't flame me to a crisp on this...

As I understand it, a process that is being traced (by, say, gdb) has
this effected by two items. First, the traced process has the
PF_PTRACED flag set. Second, signals (and, I assume, interrupts) check
this flag and do a notify_parent() if necessary. At this point the
parent (gdb) steps in and does some ptrace()'s to get data etc.

Here's the question: How does a parent process (again, say gdb) step
into "pure userspace" code that doesn't make a system_call or get
interrupted? Does it just count on the fact that, because of the
parent's overhead, we've probably passed a timer interrupt so the flag
got checked and we'll be called? Is there a special signal that the
parent sends that the child must receive, thus running do_signal() and
forcing the notify_parent()?

This isn't a vital issue, I'm just working my way through a book (Linux
Kernel Internals 2nd Ed, if you must know) and I want to make sure I
understand page 1 before I move to page 2.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/