mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-20 10:59:29 +01:00
Add "Good-bye." final log message on exit
This commit is contained in:
parent
307f4c3d9c
commit
45d6576b5a
@ -282,7 +282,8 @@ sub register_signal_handlers {
|
|||||||
|
|
||||||
$SIG{INT} = sub {
|
$SIG{INT} = sub {
|
||||||
$self->{logger}->log("SIGINT received, exiting immediately.\n");
|
$self->{logger}->log("SIGINT received, exiting immediately.\n");
|
||||||
$self->atexit; exit 0;
|
$self->atexit;
|
||||||
|
exit 0;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -291,6 +292,7 @@ sub atexit {
|
|||||||
my $self = shift;
|
my $self = shift;
|
||||||
$self->{atexit}->execute_all;
|
$self->{atexit}->execute_all;
|
||||||
alarm 0;
|
alarm 0;
|
||||||
|
$self->{logger}->log("Good-bye.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
# main loop
|
# main loop
|
||||||
|
Loading…
Reference in New Issue
Block a user