This commit harmonizes the exit status used when the child process fails
to exec gpgv with that used by posix_spawn, and ensures that the child
process is reaped when the exec fails.
close $gpgv_status; close $gpgv_flag;
our $AbortPipe = $gpgv_flag_sink; # pipe to parent
- our $AbortExitCode = 120; # arbitrary 7-bit exit code
+ our $AbortExitCode = 127; # as posix_spawn uses
# no need to use local here; this process will either exec or abort
# Adjust close-on-exec flags:
chomp $err;
if ($err =~ m/^ERR: (.*)$/) {
# This is bad - we couldn't even execute the gpgv command properly
+ waitpid $pid, 0; # reap failed child
ftp_abort
("gpg verify of directive file failed (error executing gpgv): $1");
}