diff options
author | Eric Wong <e@80x24.org> | 2021-09-23 05:53:01 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-09-23 06:21:11 +0000 |
commit | db98dfa6869f813220759e42b6de035abe40b10c (patch) | |
tree | 095f392f3be94bb5f75afd5c3d5c24240a6f7e4b /lib/PublicInbox | |
parent | 63d7b8ceee55a34cde983e8548d5ce61050d2891 (diff) | |
download | public-inbox-db98dfa6869f813220759e42b6de035abe40b10c.tar.gz |
public-inbox-init sets umask for git <2.1.0, so our fork+exec replacement needs to restore the original umask of the "parent".
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r-- | lib/PublicInbox/TestCommon.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/PublicInbox/TestCommon.pm b/lib/PublicInbox/TestCommon.pm index 92a7db36..aff34853 100644 --- a/lib/PublicInbox/TestCommon.pm +++ b/lib/PublicInbox/TestCommon.pm @@ -316,6 +316,7 @@ sub run_script ($;$$) { } 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 @@ -333,6 +334,7 @@ sub run_script ($;$$) { die "fchdir(restore): $!" if $cwdfh && !chdir($cwdfh); _undo_redirects($orig_io); select STDOUT; + umask($umask); } # slurp the redirects back into user-supplied strings |