From: kunst AT prl DOT philips DOT nl Subject: Atexit() routines called after abort() To: djgpp AT sun DOT soe DOT clarkson DOT edu (DJGPP users list) Date: Wed, 28 Jul 1993 14:49:24 +0100 (METDST) Hello DJ, I have a UNIX program which issues a call to 'abort()' inside a routine which is part of the 'atexit()' list, as a final means of terminating the program bluntly (yes, very crude...). This works on my UNIX system (i.e. I get a core dump), but the DJGPP 'abort()' doesn't prevent the 'atexit()' routines from execution. This results in a hanging program printing "Abort!" a zillion times. Perhaps you could set a flag inside the 'abort()' routine which prevents the 'atexit()' routines from being executed (in a next release). Kind regards, Pieter Kunst. ---------------------------------------------------------------------- #include #include void onexit (void) { printf ("Inside onexit..."); } main() { atexit (onexit); printf ("Before abort...\n"); abort (); printf ("After abort...\n"); } ---------------------------------------------------------------------- UNIX output: Before abort... IOT trap (core dumped) ---------------------------------------------------------------------- DJGPP output: Before abort... Abort! Inside onexit... ---------------------------------------------------------------------- .^^^^^^^^ _____________________________________ | | / Pieter Kunst (P.J.) \ | _ _| / Philips Research Laboratories, \ .--(o)(o) / Building WY3, Prof. Holstlaan 4, \ |@ _) / 5656 AA Eindhoven, The Netherlands. | | ,___| / e-mail: kunst AT prl DOT philips DOT nl / | / \_______________________________________________/ /____\