Issue
I have a sitution here,few days back I was able to see core dumbed file on my target board,I have provided the coredump generation support by adding "ulimit -c unlimited" to my /etc/profile.But then someone told me
This will only take affect for program launched from a login shell, not for processes/services started by systemd,etc/limits would the the proper location for settings these defaults.
So I changed /etc/limits file and added "ulimit -c unlimited" line.but now I could not see Coredumped file
I am running kill -9 $$ to generate segmentation fault and it in turn will generate coredump file as it was doing earlier.
We tried changing "/proc/sys/kernel/core_pattern" file and running ulimit -c unlimited explicitly also but its not working out too
Where we are doing wrong??
Solution
kill -9
will not generate a core file. The command kill -l
gives a list of supported signals. kill -6
or kill -SIGABRT
should produce a core file. As well as most other signals such as kill -BUS
, kill -SEGV
, etc.
Answered By - artless noise Answer Checked By - David Marino (WPSolving Volunteer)