changed arrangement of SIGINT and TERM so they work on MSWin32
authorminima <minima>
Tue, 10 Apr 2001 11:13:41 +0000 (11:13 +0000)
committerminima <minima>
Tue, 10 Apr 2001 11:13:41 +0000 (11:13 +0000)
Changes
perl/cluster.pl

diff --git a/Changes b/Changes
index 945bf383afef7039a3ebe38814dadd12f56fc2b2..e4e39d3d1f04074c9018fbdfc2070960fe3757c8 100644 (file)
--- 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.
index 5c53e113d0e8dbc02907e6e055f334d6df03bc4b..d3feaa39c813c7936d72fca0abd4a1cdac6ee12a 100755 (executable)
@@ -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++ };