about summary refs log tree commit homepage
path: root/lib/PublicInbox/XapClient.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-08-30 05:10:39 +0000
committerEric Wong <e@80x24.org>2023-08-30 05:27:32 +0000
commit900cb902886ce7aa257b866bcf8380f1b935c64a (patch)
treea7e0e30648754a1d07e9640d7dfc8607a1dc72f2 /lib/PublicInbox/XapClient.pm
parent1ea097fe25d3717ad0b8e232268a6d55d8ed7225 (diff)
downloadpublic-inbox-900cb902886ce7aa257b866bcf8380f1b935c64a.tar.gz
It's apparently not needed for AF_UNIX + SOCK_SEQPACKET as our
receivers never check for MSG_EOR in "struct msghdr".msg_flags
anyways.  I don't believe POSIX is clear on the exact semantics
of MSG_EOR on this socket type.  This works around truncation
problems on OpenBSD recvmsg when MSG_EOR is used by the sender.

Link: https://marc.info/?i=20230826020759.M335788@dcvr
Diffstat (limited to 'lib/PublicInbox/XapClient.pm')
-rw-r--r--lib/PublicInbox/XapClient.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/XapClient.pm b/lib/PublicInbox/XapClient.pm
index 56e3c3b4..f6c09c3b 100644
--- a/lib/PublicInbox/XapClient.pm
+++ b/lib/PublicInbox/XapClient.pm
@@ -9,7 +9,7 @@
 package PublicInbox::XapClient;
 use v5.12;
 use PublicInbox::Spawn qw(spawn);
-use Socket qw(AF_UNIX SOCK_SEQPACKET MSG_EOR);
+use Socket qw(AF_UNIX SOCK_SEQPACKET);
 use PublicInbox::IPC;
 
 sub mkreq {
@@ -21,7 +21,7 @@ sub mkreq {
         }
         my @fds = map fileno($_), @$ios;
         my $buf = join("\0", @arg, '');
-        $n = PublicInbox::IPC::send_cmd($self->{io}, \@fds, $buf, MSG_EOR) //
+        $n = PublicInbox::IPC::send_cmd($self->{io}, \@fds, $buf, 0) //
                 die "send_cmd: $!";
         $n == length($buf) or die "send_cmd: $n != ".length($buf);
         $r;