diff options
author | ache <ache@FreeBSD.org> | 1996-07-09 17:40:36 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1996-07-09 17:40:36 +0000 |
commit | a6d4555f2bdeaff4d868f81017808103a0bb95ca (patch) | |
tree | 11193f6db69cbd8a57d4a9d8f0e894b75496dfb6 /usr.sbin/ppp/main.c | |
parent | e649a4ef86e959e51e43e2f50d19a6eff8d7cf43 (diff) | |
download | FreeBSD-src-a6d4555f2bdeaff4d868f81017808103a0bb95ca.zip FreeBSD-src-a6d4555f2bdeaff4d868f81017808103a0bb95ca.tar.gz |
Dump core on SIGSEGV instead of silent exiting. I saw SIGSEGV few times,
but they are VERY rare to tracking down this bug. I hope core
helps to track it down.
Diffstat (limited to 'usr.sbin/ppp/main.c')
-rw-r--r-- | usr.sbin/ppp/main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/ppp/main.c b/usr.sbin/ppp/main.c index 5a01767..8ae6c9f 100644 --- a/usr.sbin/ppp/main.c +++ b/usr.sbin/ppp/main.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: main.c,v 1.18 1996/04/13 15:47:34 bde Exp $ + * $Id: main.c,v 1.19 1996/05/11 20:48:34 phk Exp $ * * TODO: * o Add commands for traffic summary, version display, etc. @@ -170,6 +170,11 @@ static void Hangup(signo) int signo; { + if (signo == SIGSEGV) { + LogPrintf(LOG_PHASE_BIT, "Signal %d, core dump.\n", signo); + LogClose(); + abort(); + } LogPrintf(LOG_PHASE_BIT, "Signal %d, hangup.\n", signo); Cleanup(EX_HANGUP); } |