Index: /trunk/ccl/lisp-kernel/ppc-exceptions.c
===================================================================
--- /trunk/ccl/lisp-kernel/ppc-exceptions.c	(revision 5621)
+++ /trunk/ccl/lisp-kernel/ppc-exceptions.c	(revision 5622)
@@ -38,4 +38,5 @@
 #define SA_NODEFER 0
 #endif
+#include <sysexits.h>
 
 /* a distinguished UUO at a distinguished address */
@@ -656,4 +657,6 @@
 }
 
+TCR *gc_tcr = NULL;
+
 /* Suspend and "normalize" other tcrs, then call a gc-like function
    in that context.  Resume the other tcrs, then return what the
@@ -679,4 +682,6 @@
     return 0;
   }
+
+  gc_tcr = tcr;
 
   xpGPR(xp, allocptr) = VOID_ALLOCPTR;
@@ -709,4 +714,6 @@
     other_tcr = other_tcr->next;
   } while (other_tcr != tcr);
+
+  gc_tcr = NULL;
 
   resume_other_threads(true);
@@ -1359,6 +1366,4 @@
   tcr->save_tsp = (LispObj*) ptr_from_lispobj(xpGPR(xp, tsp));
 
-  tcr->lisp_fpscr.words.l = 0xd0;
-  enable_fp_exceptions();
 
 
@@ -2095,4 +2100,33 @@
 
 void
+quit_handler(int signum, siginfo_t info, ExceptionInformation *xp)
+{
+  TCR *tcr = get_tcr(false);
+  area *a;
+  sigset_t mask;
+  
+  sigemptyset(&mask);
+
+  if (tcr) {
+    tcr->valence = TCR_STATE_FOREIGN;
+    a = tcr->vs_area;
+    if (a) {
+      a->active = a->high;
+    }
+    a = tcr->ts_area;
+    if (a) {
+      a->active = a->high;
+    }
+    a = tcr->cs_area;
+    if (a) {
+      a->active = a->high;
+    }
+  }
+  
+  pthread_sigmask(SIG_SETMASK,&mask,NULL);
+  pthread_exit(NULL);
+}
+
+void
 thread_signal_setup()
 {
@@ -2102,4 +2136,5 @@
   install_signal_handler(thread_suspend_signal, (void *) suspend_resume_handler);
   install_signal_handler(thread_resume_signal,  (void *) suspend_resume_handler);
+  install_signal_handler(SIGQUIT, (void *)quit_handler);
 }
 
@@ -2672,4 +2707,12 @@
 #endif
     kret = 0;
+    if (tcr == gc_tcr) {
+      int i;
+      write(1, "exception in GC thread. Sleeping for 60 seconds\n",sizeof("exception in GC thread.  Sleeping for 60 seconds\n"));
+      for (i = 0; i < 60; i++) {
+        sleep(1);
+      }
+      _exit(EX_SOFTWARE);
+    }
   }
   return kret;
