Phil,
On Thu, Dec 18, 2008 at 5:21 PM, Philip Mucci <mu...@cs.utk.edu> wrote: > Hey, sounds interesting. Can you describe this for us geeks? > > Phil > > On Dec 18, 2008, at 10:54 AM, stephane eranian wrote: > >> There was a problem with how breakpoints were inherited across fork >> and pthread_create. Fixing it was not easy as there is a race condition >> in the way a new thread/process notification is received via ptrace. >> >> I think I got this right finally. So please give it a try. > You can ask ptrace() to send you notifications on FORK, CLONE: However, you get two notifications for each event: - one notification for the ptrace event (FORK, CLONE) - a notification for SIGSTOP (task has stopped) The issue is that they can come in any order. Depending on what you need to do on fork/pthread_create, you may need to wait until you get SIGSTOP to do things. For instance, the particular problem I fixed was that in order to clear breakpoints (which are inherited), you needed to wait until you got the SIGSTOP notification. If you did it before that, ptrace() would fail, and breakpoints wouldn't be removed. ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel