Programming for linux: No core file when killed with SIGSEGV but get one when killing with SIGQUIT on newest questions tagged linux – Stack Overflow
I am calling setrlimit in my user space process to be able to create core files. I also set the core_pattern in sysfs. To check if it works i just write to an illegal address causing a segmentation fault:
*(int *)1 = 2
This dumps a core file so there is nothing wrong with permissions on the fs or anything else. I have also opened the file in gdb to be sure the file looks good.
However, if i replace my segmentation fault code snippet with a sleep(1000) and open up another terminal and kill the process with kill -SEGV pid I dont get any core file, the process is just interrupted from its sleep and continues execution.
The funny thing is that if i kill it with the quit signal kill -QUIT pid i get a core file.
Someone who has a reasonable explanation? Why I am running gingerbread on a rooted android 2.3 device.
source: http://stackoverflow.com/questions/11446174/no-core-file-when-killed-with-sigsegv-but-get-one-when-killing-with-sigquit
Programming for linux: programming-for-linux
Recent Comments