Index: trunk/Ohana/src/opihi/cmd.astro/flux.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/flux.c	(revision 27611)
+++ trunk/Ohana/src/opihi/cmd.astro/flux.c	(revision 39457)
@@ -1,8 +1,8 @@
 # include "astro.h"
+# include <signal.h>
 
 int flux (int argc, char **argv) {
   
   int i, j, k, xmin, ymin, xmax, ymax;
-  void *oldsignal;
   double ax, ay, s, S, flux;
   double bx[5], by[5], x[5], y[5], bb[5];
@@ -55,6 +55,6 @@
    we have to add up the angles for concave contours */
   flux = 0;
-  oldsignal = signal (SIGINT, handle_interrupt);
-  interrupt = FALSE;
+
+  struct sigaction *old_sigaction = SetInterrupt();
   for (j = ymin; (j < ymax) && !interrupt; j++) {
     V = (float *)(buf[0].matrix.buffer) + j*buf[0].matrix.Naxis[0] + xmin; 
@@ -72,5 +72,5 @@
     }
   }
-  signal (SIGINT, oldsignal);
+  ClearInterrupt (old_sigaction);
 
   gprint (GP_LOG, "flux: %f\n", flux);
