+ my $o = " (output: $self->{out})"; # add to all warnings
+ my $cb = $SIG{__WARN__} // \&CORE::warn;
+ local $SIG{__WARN__} = sub {
+ my @m = @_;
+ push(@m, $o) if !@m || $m[-1] !~ s/\n\z/$o\n/;
+ $cb->(@m);
+ };
+ $l->{-up1} = $self; # for LeiUp1->DESTROY
+ delete @$l{qw(-socks -event_init_done)};
+ my ($op_c, $op_p) = PublicInbox::PktOp->pair;
+ $self->{unref_on_destroy} = $op_c->{sock}; # to cleanup $lei->{-socks}
+ $lei->pkt_ops($op_c->{ops} //= {}); # errors from $l -> script/lei
+ push @{$lei->{-socks}}, $op_c->{sock}; # script/lei signals to $l
+ $l->{sock} = $op_p->{op_p}; # receive signals from op_c->{sock}
+ $op_c = $op_p = undef;
+