# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
# connects public-inbox processes to PublicInbox::Gcf2::loop()
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
# connects public-inbox processes to PublicInbox::Gcf2::loop()
# sock => writable pipe to Gcf2::loop
# in => pipe we read from
# pid => PID of Gcf2::loop process
# sock => writable pipe to Gcf2::loop
# in => pipe we read from
# pid => PID of Gcf2::loop process
@$self{qw(in pid)} = popen_rd($cmd, $env, $rdr);
fcntl($out_w, 1031, 4096) if $^O eq 'linux'; # 1031: F_SETPIPE_SZ
$out_w->autoflush(1);
@$self{qw(in pid)} = popen_rd($cmd, $env, $rdr);
fcntl($out_w, 1031, 4096) if $^O eq 'linux'; # 1031: F_SETPIPE_SZ
$out_w->autoflush(1);
delete $self->{in};
# GitAsyncCat::event_step may reap us with WNOHANG, too
my $pid = delete $self->{pid} or return;
delete $self->{in};
# GitAsyncCat::event_step may reap us with WNOHANG, too
my $pid = delete $self->{pid} or return;