Hi all,
I have a requirement where i need to generate core-dump by sending
SIGSEGV signal ( kill -11 <pid> ). But i found that in the net-snmpd
code there is no handler for SIGSEGV signal. I tried adding the
following code snippet but it dint work.
In snmpd.c i added the following
#ifdef SIGSEGV
RETSIGTYPE
SnmpdCore(int a)
{
printf("Process %d got signal %d\n", getpid(), a);
signal(a, SIG_DFL);
kill(getpid(), a);
}
#endif
#ifdef SIGSEGV
DEBUGMSGTL(("signal", "registering SIGSEGV signal handler\n"));
signal(SIGSEGV, SnmpdCore);
#endif
Please help me to generate core dump whenever i send SIGSEGV signal.
Thanks
Lakshmi
------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders