summaryrefslogtreecommitdiff
path: root/chat
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>1999-03-31 12:28:16 +0000
committerPaul Mackerras <paulus@samba.org>1999-03-31 12:28:16 +0000
commit084ed8efcf30963586ac5823711f9e040b8e70ce (patch)
treeaa8f72b49067180c290a597ac2938117f558c3c0 /chat
parent713f439d750c5774b1ae86b9b830a35819d00d2e (diff)
downloadppp-084ed8efcf30963586ac5823711f9e040b8e70ce.tar.gz
don't recurse in terminate()
Diffstat (limited to 'chat')
-rw-r--r--chat/chat.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/chat/chat.c b/chat/chat.c
index 4092856..5ce1336 100644
--- a/chat/chat.c
+++ b/chat/chat.c
@@ -78,7 +78,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id: chat.c,v 1.19 1998/03/24 23:57:48 paulus Exp $";
+static char rcsid[] = "$Id: chat.c,v 1.20 1999/03/31 12:28:16 paulus Exp $";
#endif
#include <stdio.h>
@@ -606,6 +606,11 @@ void break_sequence()
void terminate(status)
int status;
{
+ static int terminating = 0;
+
+ if (terminating)
+ exit(status);
+ terminating = 1;
echo_stderr(-1);
if (report_file != (char *) 0 && report_fp != (FILE *) NULL) {
/*