Apologies if this has been discussed before.. couldn't find a way to search
the archives.
In a Linux (2.6.34) based platform I have a process that does the
functionality of process management by spawning other processes, monitoring
them etc.
For debugging purposes I want to spawn a process using valgrind.. So I fork
and exec with the following parameters to execve
execvp("/usr/bin/valgrind", args);
args is an array of character pointers..
args[0] = /usr/bin/valgrind
args[1] = --log-file=<file_name>
args[2] = path to the program to be started in valgrind
args[3] = argument to the program
args[4] = '\0'
But this doesn't work. I see valgrind running, but log file is not
generated and it doesn't see to do anything.
I did an strace for an invocation of valgrind from the shell and in the
exec call the parameters are similar to what I am passing programmatically.
Any ideas what might be wrong ?
-Ram Manohar.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users