* [PATCH] examples/unsubscribe.milter: use IO::Socket, again
@ 2022-04-02 1:40 7% Eric Wong
0 siblings, 0 replies; 1+ results
From: Eric Wong @ 2022-04-02 1:40 UTC (permalink / raw)
To: meta
Sendmail::PMilter requires an IO::Socket object, not a GLOB.
Fixes: e901a56b3b30b22f (treewide: favor open(..., '+<&=', $fd), 2021-05-21)
---
examples/unsubscribe.milter | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/unsubscribe.milter b/examples/unsubscribe.milter
index 608524cb..04a39761 100644
--- a/examples/unsubscribe.milter
+++ b/examples/unsubscribe.milter
@@ -127,7 +127,7 @@ my $fds = $ENV{LISTEN_FDS};
if ($fds && (($ENV{LISTEN_PID} || 0) == $$)) {
die "$0 can only listen on one FD\n" if $fds != 1;
my $start_fd = 3;
- open(my $s, '<&=', $start_fd) or
+ my $s = IO::Socket->new_from_fd($start_fd, 'r') or
die "inherited bad FD from LISTEN_FDS: $!\n";
$milter->set_socket($s);
} else {
^ permalink raw reply related [relevance 7%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2022-04-02 1:40 7% [PATCH] examples/unsubscribe.milter: use IO::Socket, again Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).