public-inbox-init sets umask for git <2.1.0, so our fork+exec
replacement needs to restore the original umask of the "parent".
} else { # localize and run everything in the same process:
# note: "local *STDIN = *STDIN;" and so forth did not work in
# old versions of perl
+ my $umask = umask;
local %ENV = $env ? (%ENV, %$env) : %ENV;
local @SIG{keys %SIG} = map { undef } values %SIG;
local $SIG{FPE} = 'IGNORE'; # Perl default
die "fchdir(restore): $!" if $cwdfh && !chdir($cwdfh);
_undo_redirects($orig_io);
select STDOUT;
+ umask($umask);
}
# slurp the redirects back into user-supplied strings