I have a process in Linux that\'s getting a segmentation fault. How can I tell it to generate a core dump when it fails?
As explained above the real question being asked here is how to enable core dumps on a system where they are not enabled. That question is answered here.
If you've come here hoping to learn how to generate a core dump for a hung process, the answer is
gcore
if gcore is not available on your system then
kill -ABRT
Don't use kill -SEGV as that will often invoke a signal handler making it harder to diagnose the stuck process