3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-22 20:09:43 +01:00

Add "Good-bye." final log message on exit

This commit is contained in:
Pragmatic Software 2021-06-06 21:44:42 -07:00
parent 307f4c3d9c
commit 45d6576b5a

View File

@ -282,7 +282,8 @@ sub register_signal_handlers {
$SIG{INT} = sub {
$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;
$self->{atexit}->execute_all;
alarm 0;
$self->{logger}->log("Good-bye.\n");
}
# main loop