# HG changeset patch # User Eric Warmenhoven # Date 979895476 0 # Node ID 3dfd2a83fb5e39be98314041b969700292282a9e # Parent ebfde8fc7e733c53cb9595c48959ef8f50350697 [gaim-migrate @ 1425] woo hoo committer: Tailor Script diff -r ebfde8fc7e73 -r 3dfd2a83fb5e src/aim.c --- a/src/aim.c Fri Jan 19 03:19:46 2001 +0000 +++ b/src/aim.c Fri Jan 19 09:11:16 2001 +0000 @@ -387,8 +387,25 @@ #if HAVE_SIGNAL_H void sighandler(int sig) { - fprintf(stderr, "God damn, I tripped.\n"); - exit(11); /* signal 11 */ + debug_printf("caught signal %d\n", sig); + gtkspell_stop(); + switch (sig) { + case SIGSEGV: + g_print("Gaim has segfaulted and attempted to dump a core file.\n" + "Please notify the gaim maintainers by reporting a bug at\n" + "http://sourceforge.net/projects/gaim/\n\n" + "Please make sure to specify what you were doing at the time,\n" + "and post the backtrace from the core file (if you do not know\n" + "how to get the backtrace, please IM either EWarmenhoven or\n" + "RobFlynn and they can instruct you).\n"); + abort(); + break; + case SIGPIPE: + /* should we do something here? */ + default: + gtk_main_quit(); + exit(0); + } } #endif @@ -433,7 +450,10 @@ #if HAVE_SIGNAL_H /* Let's not violate any PLA's!!!! */ - /* signal(SIGSEGV, sighandler); */ + signal(SIGSEGV, sighandler); + signal(SIGHUP, sighandler); + signal(SIGINT, sighandler); + signal(SIGPIPE, sighandler); #endif diff -r ebfde8fc7e73 -r 3dfd2a83fb5e src/gtkspell.c --- a/src/gtkspell.c Fri Jan 19 03:19:46 2001 +0000 +++ b/src/gtkspell.c Fri Jan 19 09:11:16 2001 +0000 @@ -111,8 +111,7 @@ void gtkspell_stop() { if (gtkspell_running()) { - kill(spell_pid, SIGHUP); /* FIXME: is this the correct signal? */ - /* note by EWarmenhoven: no. (was SIGQUIT, is now SIGHUP) */ + kill(spell_pid, SIGHUP); } } @@ -326,6 +325,7 @@ gtk_signal_handler_unblock_by_func(GTK_OBJECT(gtktext), GTK_SIGNAL_FUNC(entry_insert_cb), NULL); gtk_text_thaw(gtktext); + g_free(newtext); } static gboolean check_at(GtkText *gtktext, int from_pos) { diff -r ebfde8fc7e73 -r 3dfd2a83fb5e src/gtkspell.h --- a/src/gtkspell.h Fri Jan 19 03:19:46 2001 +0000 +++ b/src/gtkspell.h Fri Jan 19 09:11:16 2001 +0000 @@ -54,7 +54,7 @@ extern int gtkspell_running(); /* Is gtkspell running? * - * Returns: + * Return: * nonzero if it running * zero if is not running *