mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-25 06:35:38 +02:00
+ add some explanation
This commit is contained in:
parent
9dea1d8f08
commit
c02e72eb71
@ -40,10 +40,19 @@ sub new {
|
|||||||
$self->{plugin} = undef;
|
$self->{plugin} = undef;
|
||||||
$self->{help} = undef;
|
$self->{help} = undef;
|
||||||
|
|
||||||
|
# Avoid to destroy because it keeps a ref on the object.
|
||||||
|
# A problem if we execute it multiple times in the same perl execution
|
||||||
|
# Use prepare_destroy
|
||||||
$self->set_signal_handlers;
|
$self->set_signal_handlers;
|
||||||
return $self;
|
return $self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub prepare_destroy {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
delete $handlers{DIE}->{$self};
|
||||||
|
}
|
||||||
|
|
||||||
sub set_signal_handlers {
|
sub set_signal_handlers {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user