There are a number of posts that are similar to my question here ('What changes do I need to make to generate a core dump on a segmentation fault ?') but none of them worked for me.
I have a process, say A running on my ubuntu machine. I want it to generate a core file anytime it hits a segmentation fault. I made sure 'ulimit' is unlimited. In /etc/security/limits.conf I added 2 lines
* soft core unlimited
* hard core unlimited
What else permanent configuration changes do I need to do ? And what changes do I need to make in my program so that it generates a core file when it hits a segmentation fault. Do I need to add code to handle the signal (SIGSEGV) ?