about summary refs log tree commit homepage
path: root/lib/PublicInbox/CmdIPC4.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-02-02 11:46:56 +0000
committerEric Wong <e@80x24.org>2021-02-03 07:32:40 +0000
commit9daad9d1ec9cd0a312c65182330f0d070264a486 (patch)
tree0fa1ab6d49ddcda1d00d726b30a08415ba8e0ec4 /lib/PublicInbox/CmdIPC4.pm
parent37e2fd40b9d3c37b202a693f6929411bd1064eae (diff)
downloadpublic-inbox-9daad9d1ec9cd0a312c65182330f0d070264a486.tar.gz
Diffstat (limited to 'lib/PublicInbox/CmdIPC4.pm')
-rw-r--r--lib/PublicInbox/CmdIPC4.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/PublicInbox/CmdIPC4.pm b/lib/PublicInbox/CmdIPC4.pm
index c244f6a1..74dbf8a1 100644
--- a/lib/PublicInbox/CmdIPC4.pm
+++ b/lib/PublicInbox/CmdIPC4.pm
@@ -3,7 +3,7 @@
 
 # callers should use PublicInbox::CmdIPC4->can('send_cmd4') (or recv_cmd4)
 # first choice for script/lei front-end and 2nd choice for lei backend
-# libsocket-msghdr-perl is in Debian but many other distros as of 2021.
+# libsocket-msghdr-perl is in Debian but not many other distros as of 2021.
 package PublicInbox::CmdIPC4;
 use strict;
 use v5.10.1;
@@ -12,12 +12,11 @@ BEGIN { eval {
 require Socket::MsgHdr; # XS
 no warnings 'once';
 
-# 3 FDs per-sendmsg(2) + buffer
+# any number of FDs per-sendmsg(2) + buffer
 *send_cmd4 = sub ($$$$) { # (sock, fds, buf, flags) = @_;
         my ($sock, $fds, undef, $flags) = @_;
         my $mh = Socket::MsgHdr->new(buf => $_[2]);
-        $mh->cmsghdr(SOL_SOCKET, SCM_RIGHTS,
-                        pack('i' x scalar(@$fds), @$fds));
+        $mh->cmsghdr(SOL_SOCKET, SCM_RIGHTS, pack('i' x scalar(@$fds), @$fds));
         Socket::MsgHdr::sendmsg($sock, $mh, $flags);
 };