Messages in this thread | | | From | (Linus Torvalds) | Subject | Re: Children first in fork | Date | 19 Apr 2001 10:58:45 -0700 |
| |
In article <9bn3sr$fer$1@picard.cistron.nl>, Wichert Akkerman <wichert@cistron.nl> wrote: > >What you can do is what strace does: insert a loop instruction after >the fork or clone call and remove that when the call returns.
You're probably even better off just intercepting the fork, turning it into a clone, and setting the CLONE_PTRACE option. Which (together with tracing the parent, which you will obviously be doing already in order to do all this in the first place) will nicely cause the child to get an automatic SIGSTOP _and_ be already traced.
Not that I've tested it myself.
Linus - 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/
| |