about summary refs log tree commit homepage
path: root/script
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 /script
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 'script')
-rwxr-xr-xscript/lei5
1 files changed, 1 insertions, 4 deletions
diff --git a/script/lei b/script/lei
index 1d90be0a..087afc33 100755
--- a/script/lei
+++ b/script/lei
@@ -116,10 +116,7 @@ $SIG{CONT} = sub { send($sock, 'CONT', 0) };
 my $x_it_code = 0;
 while (1) {
         my (@fds) = $recv_cmd->($sock, my $buf, 4096 * 33);
-        if (scalar(@fds) == 1 && !defined($fds[0])) {
-                next if $!{EINTR};
-                die "recvmsg: $!";
-        }
+        die "recvmsg: $!" if scalar(@fds) == 1 && !defined($fds[0]);
         last if $buf eq '';
         if ($buf =~ /\Aexec (.+)\z/) {
                 $exec_cmd->(\@fds, split(/\0/, $1));