|
From: Wayne B. <wbo...@gm...> - 2013-04-21 10:57:50
|
Hi all, I have a program (it forks itself to become a daemon, then starts a number of worker threads) which can start a sub-process (from 'only one of the threads at a time') by calling fork followed by execvp. When I run the program directly, the program works as expected and the sub-process is called, runs, logs and returns well. When the program is started under valgrind, the sub-process seams not to run - it does not log or return anything (via its pipe) and valgrind does not report anything about that process. execvp does not return, so something is starting, but I can't work out what. Any idea what I may be doing wrong? This is the command I'm using to start the process/valgrind: valgrind --leak-check=full --leak-resolution=high --error-limit=no --tool=memcheck --num-callers=50 --log-file=results/resultsFiles/valgrind.out --show-below-main=yes --track-origins=yes --track-fds=yes --show-reachable=yes --trace-children=yes /tmp/opendias_test/bin/opendias > results/resultsFiles/appLog.out I can post the sub-process calling (pipe, fork, execvp) code if that helps. Cheers for any help. Wayne Booth |
|
From: John R. <jr...@bi...> - 2013-04-21 13:00:09
|
> When the program is started under valgrind, the sub-process seams not to run ... Add the valgrind parameters: --trace-syscalls=yes -v -v -v -d -d -d Or, run under strace: strace -f -o strace.out valgrind ... -- |