diff options
author | Eric Wong <e@80x24.org> | 2021-01-10 12:15:15 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-01-12 03:51:42 +0000 |
commit | 2e755e0b5e3bc25b06055dce53009bfba4c0504b (patch) | |
tree | ca9b02aa13016ae789396e3a61d5efccc613f634 /lib/PublicInbox/LeiQuery.pm | |
parent | a1e00c6bca403ffea74a5e169fa0d2f715c69051 (diff) | |
download | public-inbox-2e755e0b5e3bc25b06055dce53009bfba4c0504b.tar.gz |
Using kill(2) is too dangerous since extremely long queries may mean the original PID of the aborted lei(1) client process to be recycled by a new process. It would be bad if the lei_xsearch worker process issued a kill on the wrong process. So just rely on sending the exit message via socket.
Diffstat (limited to 'lib/PublicInbox/LeiQuery.pm')
-rw-r--r-- | lib/PublicInbox/LeiQuery.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/LeiQuery.pm b/lib/PublicInbox/LeiQuery.pm index 040c284d..d5376be5 100644 --- a/lib/PublicInbox/LeiQuery.pm +++ b/lib/PublicInbox/LeiQuery.pm @@ -76,7 +76,7 @@ sub lei_q { } my $j = $opt->{jobs} // scalar(@srcs) > 4 ? 4 : scalar(@srcs); $j = 1 if !$opt->{thread}; - if ($self->{pid}) { + if ($self->{sock}) { $lxs->wq_workers_start('lei_xsearch', $j, $self->oldset) // $self->wq_workers($j); } |