diff -ruN klic-3.003-2002-02-20f/include/klic/sighndl.h klic-3.003-2002-02-20g/include/klic/sighndl.h
--- klic-3.003-2002-02-20f/include/klic/sighndl.h	Thu Dec 27 19:15:58 2001
+++ klic-3.003-2002-02-20g/include/klic/sighndl.h	Wed Feb 20 16:08:39 2002
@@ -36,10 +36,10 @@
 #endif
 
 /* runtime/signal.c */
-extern q* klic_signal_handler(q* allocp);
+extern void klic_signal_handler(void);
 extern void add_slit_check_handler(int sig, int (*func)());
 extern int add_signal_handler(int sig, int (*func)());
-extern q* register_streamed_signal(q* allocp, int sig, q stream);
+extern void register_streamed_signal(int sig, q stream);
 extern void init_klic_signal_handling(void);
 
 #endif /* USESIG */
diff -ruN klic-3.003-2002-02-20f/runtime/gunix.kl1 klic-3.003-2002-02-20g/runtime/gunix.kl1
--- klic-3.003-2002-02-20f/runtime/gunix.kl1	Sat Feb 16 11:58:17 2002
+++ klic-3.003-2002-02-20g/runtime/gunix.kl1	Wed Feb 20 16:11:39 2002
@@ -28,7 +28,7 @@
 #include <klic/gd_macro.h>
 
 #ifdef USESIG
-#include <signal.h>
+#include <klic/sighndl.h>
 #endif
 
 #if defined(ASYNCIO) && !defined(FASYNC)
@@ -53,7 +53,6 @@
 #define BC2KLIC convert_binary_c_string_to_klic_string
 
 GD_USE_CLASS(pointer);
-extern q* register_streamed_signal();
 
 extern char* convert_klic_string_to_c_string();
 extern q convert_c_string_to_klic_string();
@@ -398,7 +397,9 @@
 signal_stream(S,R,X) :- inline:"
 {
 #ifdef USESIG
-  allocp = register_streamed_signal(allocp, intval(%0), %1);
+  set_heapp(allocp);
+  register_streamed_signal(intval(%0), %1);
+  allocp = heapp();
 #else
   goto %f;
 #endif
diff -ruN klic-3.003-2002-02-20f/runtime/intrpt.c klic-3.003-2002-02-20g/runtime/intrpt.c
--- klic-3.003-2002-02-20f/runtime/intrpt.c	Sun Feb 17 13:16:38 2002
+++ klic-3.003-2002-02-20g/runtime/intrpt.c	Wed Feb 20 16:07:08 2002
@@ -32,10 +32,6 @@
 
 extern struct goalrec* klic_gc();
 
-#ifdef USESIG
-extern q* klic_signal_handler();
-#endif
-
 #ifdef DEBUGLIB
 extern int stepping_flag;
 extern struct goalrec* step_after();
@@ -85,7 +81,9 @@
     /* signal handling */
 #ifdef USESIG
     if( !signal_done ){
-      allocp = klic_signal_handler(allocp);
+      set_heapp(allocp);
+      klic_signal_handler();
+      allocp = heapp();
       retry = (allocp + this_more_space >= real_heaplimit);
       /* some goals may have been resumed by the signal handler */
       qp = enqueue_resumed_goals(qp);
diff -ruN klic-3.003-2002-02-20f/runtime/signal.c klic-3.003-2002-02-20g/runtime/signal.c
--- klic-3.003-2002-02-20f/runtime/signal.c	Tue Feb 19 15:23:21 2002
+++ klic-3.003-2002-02-20g/runtime/signal.c	Wed Feb 20 16:12:29 2002
@@ -34,11 +34,11 @@
 
 /* Synchronized signal handler called between reductions */
 
-extern q*
-klic_signal_handler(allocp)
-  q* allocp;
+extern void
+klic_signal_handler(void)
 {
   declare_globals;
+  q* allocp = heapp();
   int sig;
 
   do {
@@ -53,7 +53,8 @@
 	  signal_done = 0;
 	  signal_flags[sig] = 1;
 	  interrupt_off = 0;
-	  return allocp;
+	  set_heapp(allocp);
+	  return;
 	}
       }
     }
@@ -66,7 +67,7 @@
       }
     }
   } while (!signal_done);
-  return allocp;
+  set_heapp(allocp);
 }
 
 /* Utility subroutine to add signal handlers */
@@ -166,20 +167,20 @@
   return 0;
 }
 
-extern q*
-register_streamed_signal(allocp, sig, stream)
-     q *allocp;
+extern void
+register_streamed_signal(sig, stream)
      int sig;
      q stream;
 {
   extern q *do_unify();
+  q* allocp = heapp();
   if (signal_streams[sig] == 0) {
     signal_streams[sig] = stream;
     add_signal_handler(sig, streamed_signal_handler);
   } else {
     allocp = do_unify(allocp, stream, signal_streams[sig]);
   }
-  return allocp;
+  set_heapp(allocp);
 }
 
 /* Initiation */
