Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Commit

Permalink
Follow-up for bug#15227: Daemon outputs subroutine redefined in logs …
Browse files Browse the repository at this point in the history
…and provoking false task failures.
  • Loading branch information
dvuckovic committed Jul 6, 2020
1 parent bb2a778 commit e7acb77
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion bin/otrs.Daemon.pl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,14 @@
use Kernel::System::ObjectManager;

# Disable warnings for redefined subroutines by setting our own WARN signal handler.
# Output of these warnings on STDERR will trigger false task failures and sending of unnecessary emails to admins.
# Forcing package reloads in the object manager when discarding objects triggers warnings like these:
#
# Subroutine HandleDelayedEvents redefined at /opt/otrs/Kernel/System/Event/Handler.pm line 67.
#
# We must trap the warnings here as opposed in the object manager, as they might be emitted whenever any of the
# modules is reloaded in the current process. Output of the warnings on STDERR in the daemon context will trigger
# false task failures and sending of unnecessary emails to admins.
#
# Please see bug#15227 for more information.
local $SIG{__WARN__} = sub {
my $Message = shift;
Expand Down

0 comments on commit e7acb77

Please sign in to comment.