# HG changeset patch # User jwe # Date 848435670 0 # Node ID 1d63e820ee13135b1d70c6ad18efeb7e8ef13083 # Parent caa21ce81913ed84d123354b49f9d7fe40bd5916 [project @ 1996-11-19 20:34:29 by jwe] diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ Tue Nov 19 12:01:13 1996 John W. Eaton + * sighandlers.cc (my_friendly_exit): If we are called twice, try + to remove the signal handler for SIGABRT and the call abort (). + * help.cc (Ftype): If a function is defined from a file and transformed text has not been requested, just print the contents of the file. diff --git a/src/sighandlers.cc b/src/sighandlers.cc --- a/src/sighandlers.cc +++ b/src/sighandlers.cc @@ -24,7 +24,9 @@ #include #endif +#include #include + #include #include @@ -88,11 +90,28 @@ static void my_friendly_exit (const char *sig_name, int sig_number) { - error ("%s -- stopping myself...", sig_name); + static bool been_there_done_that = false; + + if (been_there_done_that) + { +#ifdef SIGABRT + octave_set_signal_handler (SIGABRT, SIG_DFL); +#endif + + error ("attempted clean up seems to have failed -- aborting..."); - save_user_variables (); + abort (); + } + else + { + been_there_done_that = true; - clean_up_and_exit (sig_number); + error ("%s -- stopping myself...", sig_name); + + save_user_variables (); + + clean_up_and_exit (sig_number); + } } // I know, not really a signal handler.