lib/PublicInbox/IPC.pm | 3 ++- diff --git a/lib/PublicInbox/IPC.pm b/lib/PublicInbox/IPC.pm index 3873649b6bb5abcaad05309285eea05cc87c8f32..078aaa2c47e1adc3d0984e8eeed4e02a00557b12 100644 --- a/lib/PublicInbox/IPC.pm +++ b/lib/PublicInbox/IPC.pm @@ -338,7 +338,6 @@ if ($pid == 0) { srand($seed); eval { PublicInbox::DS->Reset }; delete @$self{qw(-wq_s1 -wq_workers -wq_ppid)}; - @$self{keys %$fields} = values(%$fields) if $fields; $SIG{$_} = 'IGNORE' for (qw(PIPE)); $SIG{$_} = 'DEFAULT' for (qw(TTOU TTIN TERM QUIT INT CHLD)); local $0 = $self->{-wq_ident}; @@ -346,6 +345,8 @@ PublicInbox::DS::sig_setmask($oldset); # ensure we properly exit even if warn() dies: my $end = PublicInbox::OnDestroy->new($$, sub { exit(!!$@) }); eval { + $fields //= {}; + local @$self{keys %$fields} = values(%$fields); my $on_destroy = $self->ipc_atfork_child; local %SIG = %SIG; wq_worker_loop($self);