From 2e755e0b5e3bc25b06055dce53009bfba4c0504b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 10 Jan 2021 12:15:15 +0000 Subject: lei: get rid of client {pid} field 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. --- script/lei | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'script/lei') 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; -- cgit v1.2.3-24-ge0c7