From 05872a1ba3a01bdcd81402f37b3bf9c477f7c9fc Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 23 Mar 2021 11:48:06 +0000 Subject: [PATCH] lei: persistent workers (lei_store) run in / Since each lei->event_step can change the directory of lei-daemon, we need to ensure the lei_store runs in a directory that is stable. --- lib/PublicInbox/LEI.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index 17ca637e..d3ac19b2 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -453,6 +453,7 @@ sub _lei_atfork_child { my ($self, $persist) = @_; # we need to explicitly close things which are on stack if ($persist) { + chdir '/' or die "chdir(/): $!"; my @io = delete @$self{qw(0 1 2 sock)}; unless ($self->{oneshot}) { close($_) for @io; -- 2.48.1