X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fcluster.pl;h=ebe7ce0a51f9967ea56e58eeae5e9684fedeb986;hb=2343a398ca48f31195884e223839dfa0cb1d135f;hp=2ae98efcfb727d453e745c3b4bf77d57f15f752e;hpb=8942c27356acc5d5f5a20134461bcf7e6bd6a044;p=spider.git diff --git a/perl/cluster.pl b/perl/cluster.pl index 2ae98efc..ebe7ce0a 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -14,6 +14,8 @@ require 5.004; # make sure that modules are searched in the order local then perl BEGIN { + umask 002; + # root of directory tree for this system $root = "/spider"; $root = $ENV{'DXSPIDER_ROOT'} if $ENV{'DXSPIDER_ROOT'}; @@ -65,7 +67,7 @@ package main; @inqueue = (); # the main input queue, an array of hashes $systime = 0; # the time now (in seconds) -$version = "1.24"; # the version no of the software +$version = "1.27"; # the version no of the software $starttime = 0; # the starting time of the cluster $lockfn = "cluster.lock"; # lock file name @@ -157,6 +159,9 @@ sub login sub cease { my $dxchan; + + $SIG{'TERM'} = 'IGNORE'; + $SIG{'INT'} = 'IGNORE'; eval { Local::finish(); # end local processing @@ -170,6 +175,7 @@ sub cease Msg->event_loop(1, 0.05); Msg->event_loop(1, 0.05); Msg->event_loop(1, 0.05); + DXUser::finish(); Log('cluster', "DXSpider V$version stopped"); unlink $lockfn; exit(0); @@ -332,5 +338,7 @@ for (;;) { last if --$decease <= 0; } } +cease(0); +exit(0);