I am trying to handle SIGSEGV in my C++ program.
I wrote a signal handler that uses a different stack other than my program using SA_ONSTACK flag.
I want the core to be dumped when my program results in a SEGV. So i tried sending SEGV to the program using htop utility. My signal handler function is executed but I am not able to see any core dump.
What else I need to do so that I can get the core dump and how to set the path of the core dump file?
Also, I need to know if there is a way to access the core file in the program so that I can print its contents into the log file before exiting the program after it results in SEGV?