From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 5D8311FB0F for ; Wed, 24 Mar 2021 09:23:36 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 6/9] lei_store: give process a better name Date: Wed, 24 Mar 2021 14:23:32 +0500 Message-Id: <20210324092335.12345-7-e@80x24.org> In-Reply-To: <20210324092335.12345-1-e@80x24.org> References: <20210324092335.12345-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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(-) 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;