|
From: <mla...@us...> - 2008-01-23 07:13:51
|
Revision: 443
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=443&view=rev
Author: mlampard
Date: 2008-01-22 23:13:55 -0800 (Tue, 22 Jan 2008)
Log Message:
-----------
g15daemon 1.9x: libg15daemon_client - kill application after writing backtrace.
Modified Paths:
--------------
trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c
Modified: trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c
===================================================================
--- trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c 2008-01-22 10:30:52 UTC (rev 442)
+++ trunk/g15daemon-wip/libg15daemon_client/g15daemon_net.c 2008-01-23 07:13:55 UTC (rev 443)
@@ -25,6 +25,7 @@
*/
#include <string.h>
+#include <stdlib.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/wait.h>
@@ -71,7 +72,7 @@
switch (sig) {
case SIGSEGV:
#ifdef HAVE_EXECINFO_H
- fprintf(stderr, "The application caught a Segmentation Fault. Backtrace follows:\n");
+ fprintf(stderr, "The application (or it's libraries) caught a Segmentation Fault. Backtrace follows:\n");
nptrs = backtrace(buf,BACKTRACE_LEN);
btfuncs = backtrace_symbols(buf,nptrs);
@@ -80,8 +81,9 @@
for(i=0;i<nptrs;i++)
fprintf(stderr,"Backtrace: %s\n",btfuncs[i]);
-
+ fprintf(stderr,"End of Backtrace.\n");
free(btfuncs);
+ exit(1);
#endif
break;
}
@@ -99,7 +101,7 @@
char buffer[256];
if(sighandler_init==0) {
-#ifdef HAVE_BACKTRACE
+#ifdef HAVE_BACKTRACE
new_sigaction.sa_handler = g15_sighandler;
new_sigaction.sa_flags = 0;
sigaction(SIGSEGV,&new_sigaction,NULL);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|