Trap recursive bad_signal calls; idea from Richard Hipp.
authorPaul Mackerras <paulus@samba.org>
Tue, 5 May 1998 05:24:17 +0000 (05:24 +0000)
committerPaul Mackerras <paulus@samba.org>
Tue, 5 May 1998 05:24:17 +0000 (05:24 +0000)
pppd/main.c

index 7441219fa97e3be6e6193438ec36225ec98339bd..b6efbfa7b49a6bf8d7bdb25d6f6320ea0e58a65a 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: main.c,v 1.48 1998/04/28 23:37:30 paulus Exp $";
+static char rcsid[] = "$Id: main.c,v 1.49 1998/05/05 05:24:17 paulus Exp $";
 #endif
 
 #include <stdio.h>
@@ -1037,6 +1037,11 @@ static void
 bad_signal(sig)
     int sig;
 {
+    static int crashed = 0;
+
+    if (crashed)
+       _exit(127);
+    crashed = 1;
     syslog(LOG_ERR, "Fatal signal %d", sig);
     if (conn_running)
        kill_my_pg(SIGTERM);