* [PATCH 1/3] test_common: reset umask on non-forking run_script
2021-09-23 5:53 6% [PATCH 0/3] xcpdb-related fixes Eric Wong
@ 2021-09-23 5:53 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2021-09-23 5:53 UTC (permalink / raw)
To: meta
public-inbox-init sets umask for git <2.1.0, so our fork+exec
replacement needs to restore the original umask of the "parent".
---
lib/PublicInbox/TestCommon.pm | 2 ++
1 file changed, 2 insertions(+)
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
^ permalink raw reply related [relevance 7%]
* [PATCH 0/3] xcpdb-related fixes
@ 2021-09-23 5:53 6% Eric Wong
2021-09-23 5:53 7% ` [PATCH 1/3] test_common: reset umask on non-forking run_script Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2021-09-23 5:53 UTC (permalink / raw)
To: meta
Some bugs I discovered while getting cleanup stuff working
better for read-only daemons.
Eric Wong (3):
test_common: reset umask on non-forking run_script
xcpdb: -R$SHARDS creates new shards with correct perms
xcpdb: avoid race when shards are added
lib/PublicInbox/TestCommon.pm | 2 ++
lib/PublicInbox/Xapcmd.pm | 34 +++++++++++++++++++++-------------
t/extsearch.t | 7 +++++++
3 files changed, 30 insertions(+), 13 deletions(-)
^ permalink raw reply [relevance 6%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2021-09-23 5:53 6% [PATCH 0/3] xcpdb-related fixes Eric Wong
2021-09-23 5:53 7% ` [PATCH 1/3] test_common: reset umask on non-forking run_script Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).