Thanks for the tip, I'll look into that.

To clarify:
Yes I'm writing my own tool, the aim is to trace instructions and dump them
to a pid.out
But in each parent I'd like to intercept the fork and simply dump a keyword
in the pid<parent>.out that says FORK_OCCURED, makes sense?

Tommy


Bugzilla from t...@compton.nu wrote:
> 
> On 29/06/11 14:29, janjust wrote:
> 
>>     Does anyone have any pointers on how to catch when a fork in a client
>> occurs? Precisely my aim is to order the PIDs with respect to when they
>> occurred.
> 
> Presumably you're righting a tool, and want to know how the tool should 
> get called when a fork occurs? I can't see any other context in which 
> the question makes sense, but you didn't actually say what the context 
> of your question was.
> 
> What you need to look at is VG_(atfork) in include/pub_tool_libcproc.h 
> anyway, which will let you register callbacks to be called at various 
> points in the fork process.
> 
> Tom
> 
> -- 
> Tom Hughes (t...@compton.nu)
> http://compton.nu/
> 
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security 
> threats, fraudulent activity, and more. Splunk takes this data and makes 
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> Valgrind-users mailing list
> Valgrind-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/valgrind-users
> 
> 

-- 
View this message in context: 
http://old.nabble.com/catching-a-fork%28%29-in-client-tp31954761p31954980.html
Sent from the Valgrind - Users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to