if ($send_cmd && eval {
my $path = do {
my $runtime_dir = ($ENV{XDG_RUNTIME_DIR} // '') . '/lei';
+ die \0 if $runtime_dir eq '/dev/null/lei'; # oneshot forced
if ($runtime_dir eq '/lei') {
require File::Spec;
$runtime_dir = File::Spec->tmpdir."/lei-$<";
} elsif ($buf eq '-WINCH') {
kill($buf, @parent); # for MUA
} elsif ($buf =~ /\Ax_it ([0-9]+)\z/) {
- $x_it_code = $1 + 0;
+ $x_it_code ||= $1 + 0;
last;
} elsif ($buf =~ /\Achild_error ([0-9]+)\z/) {
- $x_it_code = $1 + 0;
+ $x_it_code ||= $1 + 0;
} else {
$sigchld->();
die $buf;
}
exit($x_it_code >> 8);
} else { # for systems lacking Socket::MsgHdr or Inline::C
- warn $@ if $@;
+ warn $@ if $@ && !ref($@);
require PublicInbox::LEI;
PublicInbox::LEI::oneshot(__PACKAGE__);
}