From 55dabf7d68b57aa27d862c1036f0c2ade4edb1bc Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 24 Mar 2021 14:23:32 +0500 Subject: lei_store: give process a better name We'll prioritize the last two components of the path name ("lei/store") since that's how I often refer to the on-disk location. Then, show the XDG_DATA_HOME it belongs to in case a user changes HOME or XDG_* for testing purposes. --- lib/PublicInbox/LeiStore.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/LeiStore.pm') diff --git a/lib/PublicInbox/LeiStore.pm b/lib/PublicInbox/LeiStore.pm index fa03f93c..1311ad46 100644 --- a/lib/PublicInbox/LeiStore.pm +++ b/lib/PublicInbox/LeiStore.pm @@ -329,11 +329,13 @@ sub ipc_atfork_child { sub write_prepare { my ($self, $lei) = @_; unless ($self->{-ipc_req}) { - $self->ipc_lock_init($lei->store_path . '/ipc.lock'); + my $d = $lei->store_path; + $self->ipc_lock_init("$d/ipc.lock"); + substr($d, -length('/lei/store'), 10, ''); # Mail we import into lei are private, so headers filtered out # by -mda for public mail are not appropriate local @PublicInbox::MDA::BAD_HEADERS = (); - $self->ipc_worker_spawn('lei_store', $lei->oldset, + $self->ipc_worker_spawn("lei/store $d", $lei->oldset, { lei => $lei }); } $lei->{sto} = $self; -- cgit v1.2.3-24-ge0c7