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-ASN: 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 4B64A1F934 for ; Wed, 22 Sep 2021 02:24:35 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 1/7] ipc: do not add "0" to $0 of solo workers Date: Wed, 22 Sep 2021 02:24:29 +0000 Message-Id: <20210922022435.17835-2-e@80x24.org> In-Reply-To: <20210922022435.17835-1-e@80x24.org> References: <20210922022435.17835-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: It's needless noise and misleads users reading "ps" into thinking there's more workers when there's only one. --- lib/PublicInbox/IPC.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/IPC.pm b/lib/PublicInbox/IPC.pm index add5f3df..1c699d76 100644 --- a/lib/PublicInbox/IPC.pm +++ b/lib/PublicInbox/IPC.pm @@ -353,7 +353,8 @@ sub _wq_worker_start ($$$$) { keys %{delete($self->{-wq_workers}) // {}}; $SIG{$_} = 'IGNORE' for (qw(PIPE)); $SIG{$_} = 'DEFAULT' for (qw(TTOU TTIN TERM QUIT INT CHLD)); - local $0 = "$self->{-wq_ident} $self->{-wq_worker_nr}"; + local $0 = $one ? $self->{-wq_ident} : + "$self->{-wq_ident} $self->{-wq_worker_nr}"; # ensure we properly exit even if warn() dies: my $end = PublicInbox::OnDestroy->new($$, sub { exit(!!$@) }); eval {