Force Exit/SIGTERM/SEGFAULT for memcheck?
I'm running memcheck on an application I've built on top of Wt, but Wt's too good at handling errors. In order for Valgrind to exit so it can find memory leaks, I need the Wt server to stop running. I've tried raising the SIGTERM and SIGSEGV signal, and doing terrible things with pointers, but Wt simply restarts the session without killing the server instance.
Can anyone give me a method that will cause Wthttp to commit suicide?
RE: Force Exit/SIGTERM/SEGFAULT for memcheck? - Added by Wim Dumon 11 months ago
Wt only catches sigterm, and in that handler, wt gracefully shuts down. You can turn this off by adding '-gdb' to your startup options. Wt does not catch sigsegv.
Wt does catch any uncaught exception from sessions, and kills the session with a warning when this happens.
RE: Force Exit/SIGTERM/SEGFAULT for memcheck? - Added by Tom Thorogood 11 months ago
Thanks. It took me awhile to get it right, but I finally figured out that the problem was that I was starting Wt wrapped within another command. Even with --gdb enabled. If I start the Wt process manually, the --gdb flag does allow me to CTRL+C when Valgrind is running and trace memory leaks accurately.
I appreciate your help!