Reputation: 2657
I'm trying to get the process to generate the core file using abort but unsuccessful.
abtest.c:
#include<stdlib.h>
#include <stdio.h>
int main() {
printf("callign abort...\n");
abort();
printf(".. shouldn't get here\n");
return 0;
}
Program output:
callign abort...
Abort
I can however dump a core file using gcore. It's generated in the current directory.
My coreadm output:
global core file pattern:
global core file content: default
init core file pattern: core
init core file content: default
global core dumps: disabled
per-process core dumps: enabled
global setid core dumps: disabled
per-process setid core dumps: disabled
global core dump logging: disabled
Upvotes: 0
Views: 86
Reputation: 2657
I turns out that the core files were actually directed to /var/core not the current directory. Not sure why, because coreadm did not indicate that. Also, as mentioned, gcore generated the core file in my current dir. Anyway since /var/core was not writeable (to me) no core file was generated. Made it writeable and got the core file allright.
Upvotes: 1