X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2Fcluster.pl;h=d3feaa39c813c7936d72fca0abd4a1cdac6ee12a;hb=90684940bfd187f49707548b1be79c2eff4dd30b;hp=5c53e113d0e8dbc02907e6e055f334d6df03bc4b;hpb=df3ec97bdbac858d3ba8cc1d78e8bd0bb4f6ea84;p=spider.git diff --git a/perl/cluster.pl b/perl/cluster.pl index 5c53e113..d3feaa39 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -206,8 +206,10 @@ sub cease { my $dxchan; - $SIG{'TERM'} = 'IGNORE'; - $SIG{'INT'} = 'IGNORE'; + unless ($is_win) { + $SIG{'TERM'} = 'IGNORE'; + $SIG{'INT'} = 'IGNORE'; + } DXUser::sync; @@ -386,11 +388,11 @@ AGWrestart(); dbg('err', "load badwords: " . (BadWords::load or "Ok")); # prime some signals +unless ($DB::VERSION) { + $SIG{INT} = $SIG{TERM} = sub { $decease = 1 }; +} + unless ($is_win) { - unless ($DB::VERSION) { - $SIG{INT} = \&cease; - $SIG{TERM} = \&cease; - } $SIG{HUP} = 'IGNORE'; $SIG{CHLD} = sub { $zombies++ };