diff options
author | Eric Wong <e@80x24.org> | 2023-10-06 01:02:58 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-10-06 09:38:08 +0000 |
commit | 00fe4ec336dcd8fcf3c45498d7f1ae5c228c6b92 (patch) | |
tree | 0a7d2cfe0ccd7cfd1cbc8c15017261e97ae0cb2e /script | |
parent | 14dd9df0f718f8d0815851efe52f3633ec6137b8 (diff) | |
download | public-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-x | script/lei | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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)); |