Better handling if parent closes REDO_CHEATFDS or MAKEFLAGS fds.
Silently recover if REDO_CHEATFDS file descriptors are closed, because they aren't completely essential and MAKEFLAGS-related warnings already get printed if all file descriptors have been closed. If MAKEFLAGS --jobserver-auth flags are closed, improve the error message so that a) it's a normal error instead of an exception and b) we link to documentation about why it happens. Also write some more detailed documentation about what's going on here.
This commit is contained in:
parent
bcc05a6e86
commit
3dbdfbc06f
16 changed files with 136 additions and 47 deletions
1
t/205-readonly/.gitignore
vendored
Normal file
1
t/205-readonly/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
/rodir
|
||||
25
t/205-readonly/all.do
Normal file
25
t/205-readonly/all.do
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
[ -e rodir ] && chmod u+w rodir
|
||||
[ -e rodir/rwdir ] && chmod u+w rodir/rwdir
|
||||
rm -rf rodir
|
||||
mkdir rodir rodir/rwdir
|
||||
|
||||
cd rodir
|
||||
cat >default.ro1.do <<-EOF
|
||||
chmod u+w "\$(dirname "\$1")"
|
||||
echo 'redir' >\$3
|
||||
EOF
|
||||
cat >default.ro2.do <<-EOF
|
||||
chmod u+w "\$(dirname "\$1")"
|
||||
echo 'stdout'
|
||||
EOF
|
||||
|
||||
# Check that:
|
||||
# - redo works when the .do file is in a read-only directory.
|
||||
# - redo works when the target is in a read-only directory that becomes
|
||||
# writable only *after* launching the .do script. (For example, the .do
|
||||
# might mount a new read-write filesystem in an otherwise read-only
|
||||
# tree.)
|
||||
chmod a-w . rwdir
|
||||
redo rwdir/a.ro1
|
||||
chmod a-w . rwdir
|
||||
redo rwdir/a.ro2
|
||||
4
t/205-readonly/clean.do
Normal file
4
t/205-readonly/clean.do
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
[ -e rodir ] && chmod u+w rodir
|
||||
[ -e rodir/rwdir ] && chmod u+w rodir/rwdir
|
||||
rm -rf rodir
|
||||
rm -f *~ .*~
|
||||
Loading…
Add table
Add a link
Reference in a new issue