sub do_convert { # via wq_do
my ($self) = @_;
- $self->input_stdin;
+ $PublicInbox::DS::in_loop = 0; # force synchronous dwaitpid
for my $input (@{$self->{inputs}}) {
$self->input_path_url($input);
}
my ($lei, @inputs) = @_;
$lei->{opt}->{kw} //= 1;
$lei->{opt}->{dedupe} //= 'none';
- my $self = $lei->{cnv} = bless {}, __PACKAGE__;
+ my $self = bless {}, __PACKAGE__;
my $ovv = PublicInbox::LeiOverview->new($lei, 'out-format');
$lei->{l2m} or return
$lei->fail("output not specified or is not a mail destination");
- $lei->{opt}->{augment} = 1 unless $ovv->{dst} eq '/dev/stdout';
+ my $devfd = $lei->path_to_fd($ovv->{dst}) // return;
+ $lei->{opt}->{augment} = 1 if $devfd < 0;
$self->prepare_inputs($lei, \@inputs) or return;
- my $op = $lei->workers_start($self, 'lei_convert', 1);
+ my ($op_c, $ops) = $lei->workers_start($self, 'lei_convert', 1);
+ $lei->{cnv} = $self;
$self->wq_io_do('do_convert', []);
$self->wq_close(1);
- while ($op && $op->{sock}) { $op->event_step }
+ $op_c->op_wait_event($ops);
}
sub ipc_atfork_child {