mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-20 02:49:49 +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 {
|
||||
$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
|
||||
|
Loading…
Reference in New Issue
Block a user