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
This is the command I'm using to start the process/valgrind:
valgrind --leak-check=full --leak-resolution=high --error-limit=no
--track-origins=yes --track-fds=yes --show-reachable=yes
--trace-children=yes /tmp/opendias_test/bin/opendias >
I can post the sub-process calling (pipe, fork, execvp) code if that helps.
Cheers for any help.
From: John Reiser <jreiser@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 ...
Get latest updates about Open Source Projects, Conferences and News.