merged changes
[spider.git] / perl / cluster.pl
index b96cf370b3162081628d7e355e66fe316215b1b3..6ed864b13578ce5bf175310b92351128110ef4bc 100755 (executable)
@@ -188,6 +188,8 @@ sub cease
        $SIG{'TERM'} = 'IGNORE';
        $SIG{'INT'} = 'IGNORE';
        
+       DXUser::sync;
+
        eval {
                Local::finish();   # end local processing
        };
@@ -330,6 +332,13 @@ $SIG{'TERM'} = \&cease;
 $SIG{'HUP'} = 'IGNORE';
 $SIG{'CHLD'} = \&reap;
 
+$SIG{PIPE} = sub {     dbg('err', "Broken PIPE signal received"); };
+$SIG{IO} = sub {       dbg('err', "SIGIO received"); };
+$SIG{ILL} = $SIG{FPE} = 
+       $SIG{SEGV} = $SIG{USR1} = $SIG{USR2} =
+       $SIG{BUS} = sub { my $sig = shift;      DXDebug::confess("Caught signal $sig");  };
+
+
 # read in system messages
 DXM->init();
 
@@ -379,11 +388,6 @@ dbg('err', "orft we jolly well go ...");
 
 #open(DB::OUT, "|tee /tmp/aa");
 
-$SIG{PIPE} = sub { 
-       #$DB::single = 1;  
-       dbg('err', "Broken PIPE signal received"); 
-};
-
 for (;;) {
        my $timenow;
 #      $DB::trace = 1;
@@ -404,6 +408,7 @@ for (;;) {
                DXConnect::process();
                DXMsg::process();
                DXDb::process();
+               DXUser::process();
                eval { 
                        Local::process();       # do any localised processing
                };