From: Alex I. <ale...@in...> - 2003-05-27 21:00:05
|
<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> Hi all, <p>I have an application that spawns quite a few children processes. These children cannot be run standalone, they have to spawned by that master process. What I would like to do is to spawn just one of the children with Valgrind. I can tell the master application which child to spawn with Valgrind via a command-line switch, but the actual spawning is where I am at a loss. The master app is doing an execl() call, so I would need to explicitly list all Valgrind options in that call and then the application name. This is not very useful since I won't be able to change skins and options on the fly. <p>One way I could do it is tweak Valgrind code to read options from an environment variable, say VALGRIND_OPTS="-v --logfile=/tmp/VLOG" --leak-check=yes" and then in execl() call do something like: <p>if ( valgrind switch is set ) <br> execl ( ... , "valgrind", "Application", .... ) <br>else <br> execl ( ... , "Application", ... ) <p>I would rather not modify Valgrind source, since I would have to carry over changes between Valgrind versions. Is there any easier way to do what I am trying to accomplish? Any help would be greatly appreciated! <p>Thanks! <br>Alex Ivershen <pre>-- Alex G. Ivershen Inet Technologies, Inc. Network Products Dept. 1500 N. Greenville Ave. Inet Technologies Inc. Richardson, TX 75081 Phone: +1-469-330-4295 USA "Black Holes are where God divided by zero"</pre> </html> |