Article 544N2 core not generating for raise(SIGABRT)

core not generating for raise(SIGABRT)

by
chakka.lokesh
from LinuxQuestions.org on (#544N2)
I have set

Quote:
ulimit -c unlimited
Following is the sample code I have written :

Code:#define _GNU_SOURCE

#include<signal.h>
#include<stdlib.h>
#include<stdio.h>
#include<unistd.h>

int main()
{
raise( SIGABRT );
if( setresuid( 0, 0, 0 ) == -1 )
{
fprintf( stderr, "%s %d\n", __func__, __LINE__ );
exit(1);
}
return 0;
}Following are the commands I am executing :
Quote:
$ gcc dump.c
$ sudo chown root:root a.out
$ sudo chmod +s a.out
$ ./a.out
$ sudo ./a.out
If I try ./a.out, core is not getting generated. But core is getting generated for sudo ./a.out. Is there a way I can generate the core just by using ./a.outlatest?d=yIl2AUoC8zA latest?i=u1PgRKtdrvk:z_VsmXhcdaA:F7zBnMy latest?i=u1PgRKtdrvk:z_VsmXhcdaA:V_sGLiP latest?d=qj6IDK7rITs latest?i=u1PgRKtdrvk:z_VsmXhcdaA:gIN9vFwu1PgRKtdrvk
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments