about summary refs log tree commit homepage
path: root/lib/PublicInbox/LEI.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-11-09 10:09:35 +0000
committerEric Wong <e@80x24.org>2023-11-09 21:53:47 +0000
commit45edb4b5e13c5f030e776577045386f11c797c6c (patch)
tree8d867c2c1822b0ae687786e3755b3056199f91fd /lib/PublicInbox/LEI.pm
parentc8a229eca341949ff37c4958f7c75a9cea3a990d (diff)
downloadpublic-inbox-45edb4b5e13c5f030e776577045386f11c797c6c.tar.gz
->lei_daemon_pid can only be called in the top-level daemon
process when $daemon_pid is valid, so avoid a getpid(2) syscall
in those cases.
Diffstat (limited to 'lib/PublicInbox/LEI.pm')
-rw-r--r--lib/PublicInbox/LEI.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm
index 2832db63..f32e5bbc 100644
--- a/lib/PublicInbox/LEI.pm
+++ b/lib/PublicInbox/LEI.pm
@@ -927,7 +927,7 @@ sub _config {
         run_wait($cmd, \%env, \%opt) ? ($err_ok ? undef : fail($self, $?)) : 1;
 }
 
-sub lei_daemon_pid { puts shift, $$ }
+sub lei_daemon_pid { puts shift, $daemon_pid }
 
 sub lei_daemon_kill {
         my ($self) = @_;