Changeset 3842

Show
Ignore:
Timestamp:
07/28/10 14:45:16 (2 years ago)
Author:
ligne
Message:

remove the pid file in the signal handler, rather than in the destructor. the pollers also call the destructor...

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/node/lib/Munin/Node/ProxySpooler.pm

    r3841 r3842  
    7777        logger("Spooler caught SIG$_[0].  Shutting down"); 
    7878        kill -15, $$; 
     79 
     80        if ($self->{have_pid_file}) { 
     81            logger('Removing pidfile') if $config->{DEBUG}; 
     82            unlink_pid_file($self->{pid_file}); 
     83        } 
     84 
    7985        exit 0; 
    8086    }; 
     
    110116    logger('Spooler shutting down'); 
    111117    exit 0; 
    112 } 
    113  
    114  
    115 # tidy up on exit 
    116 sub DESTROY 
    117 { 
    118     my ($self) = @_; 
    119  
    120     if ($self->{have_pid_file}) { 
    121         logger('Removing pidfile'); 
    122         unlink_pid_file($self->{pid_file}); 
    123     } 
    124  
    125     return; 
    126118} 
    127119