From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id E3B241F405 for ; Fri, 2 Feb 2024 09:24:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1706865900; bh=yBzbRJN5RDms89gP3CQ8L+1N1ALrHi8vOj6onztLn7o=; h=From:To:Subject:Date:From; b=2APKHl84BYdbn9OpvV/UA53PH8UNiZA5b7EtRriV5MIf0AIodIirX/JFygr+6aCO+ e+A5fFtscce3RlXPG35+Fd/8YAqMtWhDhIHJ+YBn3PkTJwSzxqJMIZl1hL1B3ATjdU H8lTRp9koOcLmZPpr0QgTzcMIjaeoydDpsUpqgzo= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] daemon: quiet Email::Address::XS warnings properly Date: Fri, 2 Feb 2024 09:24:59 +0000 Message-ID: <20240202092459.2802045-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Setting $SIG{__WARN__} at the top-level no longer has any effect since we localize $SIG{__WARN__} when entering ->event_step on a per-listener basis. Fixes: 60d262483a4d (daemon: use per-listener SIG{__WARN__} callbacks, 2022-08-08) --- lib/PublicInbox/Daemon.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/Daemon.pm b/lib/PublicInbox/Daemon.pm index a2c1ed6e..7aee5c72 100644 --- a/lib/PublicInbox/Daemon.pm +++ b/lib/PublicInbox/Daemon.pm @@ -143,8 +143,11 @@ sub load_mod ($;$$) { $tlsd->{$f} = $logs{$p} //= open_log_path(my $fh, $p); warn "# $scheme://$addr $f=$p\n"; } + # for per-listener $SIG{__WARN__}: my $err = $tlsd->{err}; - $tlsd->{warn_cb} = sub { print $err @_ }; # for local $SIG{__WARN__} + $tlsd->{warn_cb} = sub { + print $err @_ unless PublicInbox::Eml::warn_ignore(@_) + }; $opt->{'multi-accept'} and $xn{'multi-accept'} = $opt->{'multi-accept'}->[-1]; \%xn; @@ -698,7 +701,6 @@ sub run { # localize GCF2C for tests: local $PublicInbox::GitAsyncCat::GCF2C; local $PublicInbox::Git::async_warn = 1; - local $SIG{__WARN__} = PublicInbox::Eml::warn_ignore_cb(); local %WORKER_SIG = %WORKER_SIG; local %POST_ACCEPT;