* Makefile: added all: and default: targets.
* many files: made some functions static; removed "extern int errno;".
* frozenmain.c: fixed bugs introduced on 24 June...
* flmodule.c: remove 1.5 bw compat hacks, add new functions in 2.2a
(and some old functions that were omitted).
* timemodule.c: added MSDOS floatsleep version .
* pgenmain.c: changed exit() to goaway() and added defn of goaway().
* intrcheck.c: add hack (to UNIX only) so interrupting 3 times
will exit from a hanging program. The second interrupt prints
a message explaining this to the user.
diff --git a/Parser/intrcheck.c b/Parser/intrcheck.c
index 4636b3f..f5891ee 100644
--- a/Parser/intrcheck.c
+++ b/Parser/intrcheck.c
@@ -131,7 +131,20 @@
intcatcher(sig)
int sig; /* Not used by required by interface */
{
- interrupted = 1;
+ extern void goaway PROTO((int));
+ static char message[] =
+"python: to interrupt a truly hanging Python program, interrupt once more.\n";
+ switch (interrupted++) {
+ case 0:
+ break;
+ case 1:
+ write(2, message, strlen(message));
+ break;
+ case 2:
+ interrupted = 0;
+ goaway(1);
+ break;
+ }
signal(SIGINT, intcatcher);
}