about summary refs log tree commit homepage
path: root/lib/PublicInbox/LEI.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-10-06 01:02:58 +0000
committerEric Wong <e@80x24.org>2023-10-06 09:38:08 +0000
commit00fe4ec336dcd8fcf3c45498d7f1ae5c228c6b92 (patch)
tree0a7d2cfe0ccd7cfd1cbc8c15017261e97ae0cb2e /lib/PublicInbox/LEI.pm
parent14dd9df0f718f8d0815851efe52f3633ec6137b8 (diff)
downloadpublic-inbox-00fe4ec336dcd8fcf3c45498d7f1ae5c228c6b92.tar.gz
This ensures script/lei $send_cmd usage is EINTR-safe (since
I prefer to avoid loading PublicInbox::IPC for startup time).
Overall, it saves us some code, too.
Diffstat (limited to 'lib/PublicInbox/LEI.pm')
-rw-r--r--lib/PublicInbox/LEI.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm
index e300f0a4..f8bcd43d 100644
--- a/lib/PublicInbox/LEI.pm
+++ b/lib/PublicInbox/LEI.pm
@@ -1041,7 +1041,7 @@ sub start_mua {
 
 sub send_exec_cmd { # tell script/lei to execute a command
         my ($self, $io, $cmd, $env) = @_;
-        PublicInbox::IPC::send_cmd(
+        $PublicInbox::IPC::send_cmd->(
                         $self->{sock} // die('lei client gone'),
                         [ map { fileno($_) } @$io ],
                         exec_buf($cmd, $env), 0) //
@@ -1139,7 +1139,7 @@ sub accept_dispatch { # Listener {post_accept} callback
         select($rvec, undef, undef, 60) or
                 return send($sock, 'timed out waiting to recv FDs', 0);
         # (4096 * 33) >MAX_ARG_STRLEN
-        my @fds = PublicInbox::IPC::recv_cmd($sock, my $buf, 4096 * 33) or
+        my @fds = $PublicInbox::IPC::recv_cmd->($sock, my $buf, 4096 * 33) or
                 return; # EOF
         if (!defined($fds[0])) {
                 warn(my $msg = "recv_cmd failed: $!");
@@ -1178,7 +1178,7 @@ sub event_step {
         local %ENV = %{$self->{env}};
         local $current_lei = $self;
         eval {
-                my @fds = PublicInbox::IPC::recv_cmd(
+                my @fds = $PublicInbox::IPC::recv_cmd->(
                         $self->{sock} // return, my $buf, 4096);
                 if (scalar(@fds) == 1 && !defined($fds[0])) {
                         return if $! == EAGAIN;