diff -U3 -w -r zchaff/Makefile zchaff.modified/Makefile
--- zchaff/Makefile	2004-11-15 21:44:14.000000000 +0200
+++ zchaff.modified/Makefile	2005-05-16 15:51:20.000000000 +0300
@@ -1,4 +1,4 @@
-CC = g++ -Wall
+CC = g++ -Wall -static -DHUPHANDLER
 CFLAGS = -O3
 
 #MFLAGS = 
Only in zchaff.modified: SAT_C.h
Only in zchaff.modified: core
Only in zchaff.modified: libsat.a
Only in zchaff.modified: sat_solver.o
Only in zchaff.modified: zchaff
Only in zchaff.modified: zchaff_base.o
Only in zchaff.modified: zchaff_c_wrapper.cpp
Only in zchaff.modified: zchaff_c_wrapper.o
Only in zchaff.modified: zchaff_cpp_wrapper.cpp
Only in zchaff.modified: zchaff_cpp_wrapper.o
Only in zchaff.modified: zchaff_dbase.o
diff -U3 -w -r zchaff/zchaff_solver.cpp zchaff.modified/zchaff_solver.cpp
--- zchaff/zchaff_solver.cpp	2004-11-15 21:44:07.000000000 +0200
+++ zchaff.modified/zchaff_solver.cpp	2005-05-16 15:49:20.000000000 +0300
@@ -40,6 +40,7 @@
 #include <map>
 #include <set>
 #include <queue>
+#include <csignal>
 
 using namespace std;
 
@@ -51,6 +52,10 @@
 ofstream verify_out("resolve_trace");
 #endif
 
+#ifdef HUPHANDLER
+double startcputime; // Kludge-a-lot
+#endif
+
 void CSolver::re_init_stats(void) {
   _stats.is_mem_out           = false;
   _stats.outcome              = UNDETERMINED;
@@ -82,6 +87,12 @@
   _stats.been_reset                   = true;
   _stats.num_free_variables           = 0;
   _stats.num_free_branch_vars         = 0;
+#ifdef HUPHANDLER
+  /* Get the stats to a global struct so we can use them from signal
+   * handlers
+   */
+  startcputime = _stats.start_cpu_time;
+#endif
 }
 
 void CSolver::init_parameters(void) {
@@ -894,7 +905,25 @@
   }
 }
 
+#ifdef HUPHANDLER
+/*
+ * Send this to stop solving
+ */
+void hup(int sig)
+{
+    cout << endl << "SIGHUP" << endl;
+    cout << "Total Run Time\t" << get_cpu_time() - startcputime << endl;
+    exit(0);
+}
+#endif
+
 int CSolver::solve(void) {
+#ifdef HUPHANDLER
+  /*
+   * Set signal handler for SIGHUP
+   */
+  signal(SIGHUP, hup);
+#endif
   if (_stats.outcome == UNDETERMINED) {
     init_solve();
 
diff -U3 -w -r zchaff/zchaff_solver.h zchaff.modified/zchaff_solver.h
--- zchaff/zchaff_solver.h	2004-11-15 21:44:07.000000000 +0200
+++ zchaff.modified/zchaff_solver.h	2005-05-16 15:19:32.000000000 +0300
@@ -198,6 +198,7 @@
   }
 };
 
+
 class CSolver:public CDatabase {
   protected:
     int                 _id;                  // the id of the solver, in case
Only in zchaff.modified: zchaff_solver.o
Only in zchaff.modified: zchaff_utils.o
