1

I use the valgrind version 3.12.0 under x86_64 GNU/Linux. The distibuition of Linux is the Suse version 3.0.101-63-default. I try to terminate the valgrind process using kill pid , but the signal is ignored. Only when the SIGBUS signal is sent the valgrind is terminated and the summary is created. But I do not know if using this signal I take the correct results? Is any other way to terminate the valgrind? I use kill -9 but no summary is create at all

Thank you

getsoubl
  • 808
  • 10
  • 25

1 Answers1

1

Effectively, kill -9 does not allow valgrind to produce a report, as signal 9 cannot be handled by a process. Any other signal that will terminate your program will be properly handled by Valgrind, and lead to e.g. a correct leak report for memcheck tool.

Note that by using from a shell the vgdb command, you can give instructions to valgrind during execution. For example, you can trigger a leak search.

See http://www.valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.valgrind-monitor-commands for more information.

phd
  • 3,669
  • 1
  • 11
  • 12
  • 1
    I have been trying to get sigint to a program under valgrind and no matter what I do, I can't get valgrind to forward it on. This is on OS X. – jtgrassie Jul 29 '18 at 13:54
  • @jtgrassie I am not using OSX so cannot help much. Try to run with -v -v -v -d -d -d --trace-signals=yes, that might give a hint about the problem. – phd Jul 29 '18 at 14:41