about summary refs log tree commit homepage
path: root/script
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-01-03 11:24:50 +0000
committerEric Wong <e@80x24.org>2021-01-03 18:24:08 +0000
commitb156cb4ef176b41131154a6d7632aed92b143fa0 (patch)
tree46b13794fbc87a2b0133a1f450328f0b35e0539d /script
parent0939882b8a883e3f034bd059cdec4984d36f4ac7 (diff)
downloadpublic-inbox-b156cb4ef176b41131154a6d7632aed92b143fa0.tar.gz
We'll always be transferring stdin, stdout, and stderr together
for lei.  Perhaps I lack imagination or foresight, but I can't
think of a reason to send more or less FDs.
Diffstat (limited to 'script')
-rwxr-xr-xscript/lei6
1 files changed, 3 insertions, 3 deletions
diff --git a/script/lei b/script/lei
index 67e8b8b0..029881f8 100755
--- a/script/lei
+++ b/script/lei
@@ -4,10 +4,10 @@
 use strict;
 use v5.10.1;
 use Socket qw(AF_UNIX SOCK_STREAM pack_sockaddr_un);
-my $send_fd;
+my $send_3fds;
 if (my ($sock, $pwd) = eval {
         require PublicInbox::Spawn;
-        $send_fd = PublicInbox::Spawn->can('send_fd') or die
+        $send_3fds = PublicInbox::Spawn->can('send_3fds') or die
                 "Inline::C not installed/configured or IO::FDPass missing\n";
         my $path = do {
                 my $runtime_dir = ($ENV{XDG_RUNTIME_DIR} // '') . '/lei';
@@ -60,7 +60,7 @@ Falling back to (slow) one-shot mode
         $buf .= "\0\0";
         select $sock;
         $| = 1; # unbuffer selected $sock
-        $send_fd->(fileno($sock), $_) for (0..2);
+        $send_3fds->(fileno($sock), 0, 1, 2);
         print $sock $buf or die "print(sock, buf): $!";
         while ($buf = <$sock>) {
                 $buf =~ /\Aexit=([0-9]+)\n\z/ and exit($1 + 0);