From: minima Date: Tue, 10 Apr 2001 11:13:41 +0000 (+0000) Subject: changed arrangement of SIGINT and TERM so they work on MSWin32 X-Git-Tag: R_1_47~34 X-Git-Url: http://scm.dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=90684940bfd187f49707548b1be79c2eff4dd30b;p=spider.git changed arrangement of SIGINT and TERM so they work on MSWin32 --- diff --git a/Changes b/Changes index 945bf383..e4e39d3d 100644 --- a/Changes +++ b/Changes @@ -5,6 +5,7 @@ regardless of whatever else you might have in the directory. 3. made shortcut at shutdown so that you don't get a storm of PC21s on busy nodes as each connection goes down. Just send a pc39 to each interface and nothing else. +4. changed action of SIG{INT} and SIG{TERM} so that they now work on MSWin32 10Apr01======================================================================= 1. altered PC21 logic somewhat to eliminate dup PC21s 2. disconnect should remove dangling local users in the routing table. 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++ };