Changeset 2d605730b358ee1e0a09356c06aad13e1696b839

Show
Ignore:
Timestamp:
06/30/08 19:39:43 (10 years ago)
Author:
Mark Harrison <mark@omniti.com>
git-committer:
Mark Harrison <mark@omniti.com> 1214854783 +0000
git-parent:

[ed0c3d1f426dd8869c5eeb07c0dbbba787363d34]

git-author:
Mark Harrison <mark@omniti.com> 1214854783 +0000
Message:

Making the sighup handler wait until it is safe to reload. Reloading in the
middle of a module check is a bad thing(tm).

git-svn-id: https://labs.omniti.com/resmon/trunk@133 8c0face9-b7db-6ec6-c4b3-d5f7145c7d55

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • resmon

    ra3ac157 r2d60573  
    7171} 
    7272 
    73 $SIG{'HUP'} = \&reconfigure; 
     73my $sighup = 0; 
     74sub sighup_handler { $sighup = 1; } 
     75$SIG{'HUP'} = \&sighup_handler; 
     76 
    7477configure(); 
    7578 
     
    134137  } 
    135138  $status->close(); 
     139  if ($sighup) { 
     140    $sighup = 0; 
     141    reconfigure(); 
     142  } 
    136143  die "Exiting.\n" if($sigint); 
    137144  wait_interval();