Mercurial > pidgin
changeset 1415:3dfd2a83fb5e
[gaim-migrate @ 1425]
woo hoo
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Fri, 19 Jan 2001 09:11:16 +0000 |
parents | ebfde8fc7e73 |
children | 39636e80fef2 |
files | src/aim.c src/gtkspell.c src/gtkspell.h |
diffstat | 3 files changed, 26 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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) {