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:15 +0000
committerEric Wong <e@80x24.org>2021-01-12 03:51:42 +0000
commit2e755e0b5e3bc25b06055dce53009bfba4c0504b (patch)
treeca9b02aa13016ae789396e3a61d5efccc613f634 /script
parenta1e00c6bca403ffea74a5e169fa0d2f715c69051 (diff)
downloadpublic-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 'script')
-rwxr-xr-xscript/lei2
1 files changed, 1 insertions, 1 deletions
diff --git a/script/lei b/script/lei
index 5e30f4d7..bea06b2c 100755
--- a/script/lei
+++ b/script/lei
@@ -62,7 +62,7 @@ Falling back to (slow) one-shot mode
         1;
 }) { # (Socket::MsgHdr|IO::FDPass|Inline::C), $sock, $pwd are all available:
         local $ENV{PWD} = $pwd;
-        my $buf = join("\0", $$, scalar(@ARGV), @ARGV);
+        my $buf = join("\0", scalar(@ARGV), @ARGV);
         while (my ($k, $v) = each %ENV) { $buf .= "\0$k=$v" }
         $buf .= "\0\0";
         select $sock;