X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=chat%2Fchat.c;h=5ce1336e381329afb811bb71e209efd840ade535;hb=e8be982dbc5c6c50dfc9f66737867570c8ed4973;hp=90dcc5be837cac3787c77d9fc5fe66c1bd858699;hpb=39f685ec9a552874cd02b511bbf84b3912b1058b;p=ppp.git diff --git a/chat/chat.c b/chat/chat.c index 90dcc5b..5ce1336 100644 --- a/chat/chat.c +++ b/chat/chat.c @@ -78,7 +78,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: chat.c,v 1.18 1998/02/04 01:35:49 paulus Exp $"; +static char rcsid[] = "$Id: chat.c,v 1.20 1999/03/31 12:28:16 paulus Exp $"; #endif #include @@ -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) { /* @@ -1414,6 +1419,16 @@ register char *string; return (0); } +/* + * Gross kludge to handle Solaris versions >= 2.6 having usleep. + */ +#ifdef SOL2 +#include +#if MAXUID > 65536 /* then this is Solaris 2.6 or later */ +#undef NO_USLEEP +#endif +#endif /* SOL2 */ + #ifdef NO_USLEEP #include #include