]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/IPC.pm
ipc: do not add "0" to $0 of solo workers
[public-inbox.git] / lib / PublicInbox / IPC.pm
index add5f3dfd1d4a6377077a5ebbe414ded1f0215c7..1c699d76fea1578558ec5361ae5d8e19913deef7 100644 (file)
@@ -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 {