about summary refs log tree commit homepage
path: root/script
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-01-10 12:15:18 +0000
committerEric Wong <e@80x24.org>2021-01-12 03:51:43 +0000
commit3019046b3ab9736922762df111d60ef7647e36a3 (patch)
tree6cc7ec956a0c4e3b392367fa7bced25943dbc7b7 /script
parent7b79c918a5ea79f6adc380ca917b0353475ab29c (diff)
downloadpublic-inbox-3019046b3ab9736922762df111d60ef7647e36a3.tar.gz
It's easier to make the code more generic by transferring
all four FDs (std(in|out|err) + socket) instead of omitting
stdin.

We'll be reading from stdin on some imports, and possibly
outputting to stdout, so omitting stdin now would needlessly
complicate things.

The differences with IO::FDPass "1" code paths and the "4"
code paths used by Inline::C and Socket::MsgHdr are far too
much to support and test at the moment.
Diffstat (limited to 'script')
-rwxr-xr-xscript/lei9
1 files changed, 2 insertions, 7 deletions
diff --git a/script/lei b/script/lei
index aac8fa94..5c32ab88 100755
--- a/script/lei
+++ b/script/lei
@@ -8,11 +8,6 @@ use PublicInbox::CmdIPC4;
 my $narg = 4;
 my $recv_cmd = PublicInbox::CmdIPC4->can('recv_cmd4');
 my $send_cmd = PublicInbox::CmdIPC4->can('send_cmd4') // do {
-        require PublicInbox::CmdIPC1; # 2nd choice
-        $narg = 1;
-        $recv_cmd = PublicInbox::CmdIPC1->can('recv_cmd1');
-        PublicInbox::CmdIPC1->can('send_cmd1');
-} // do {
         require PublicInbox::Spawn; # takes ~50ms even if built *sigh*
         $narg = 4;
         $recv_cmd = PublicInbox::Spawn->can('recv_cmd4');
@@ -77,7 +72,7 @@ Falling back to (slow) one-shot mode
                 $pwd = $cwd;
         }
         1;
-}) { # (Socket::MsgHdr|IO::FDPass|Inline::C), $sock, $pwd are all available:
+}) { # (Socket::MsgHdr|Inline::C), $sock, $pwd are all available:
         local $ENV{PWD} = $pwd;
         my $buf = join("\0", scalar(@ARGV), @ARGV);
         while (my ($k, $v) = each %ENV) { $buf .= "\0$k=$v" }
@@ -94,7 +89,7 @@ Falling back to (slow) one-shot mode
                         die $buf;
                 }
         }
-} else { # for systems lacking Socket::MsgHdr, IO::FDPass or Inline::C
+} else { # for systems lacking Socket::MsgHdr or Inline::C
         warn $@ if $@;
         require PublicInbox::LEI;
         PublicInbox::LEI::oneshot(__PACKAGE__);