-sub public_inbox_fork_exec ($$$$$$) {
- my ($in, $out, $err, $f, $cmd, $env) = @_;
- my $pid = fork;
+sub pi_fork_exec ($$$$$$$) {
+ my ($redir, $f, $cmd, $env, $rlim, $cd, $pgid) = @_;
+ my $old = POSIX::SigSet->new();
+ my $set = POSIX::SigSet->new();
+ $set->fillset or die "sigfillset: $!";
+ sigprocmask(SIG_SETMASK, $set, $old) or die "SIG_SETMASK(set): $!";
+ my $syserr;
+ pipe(my ($r, $w)) or die "pipe: $!";
+ my $pid = fork // die "fork (+exec) @$cmd: $!\n";