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
12
t/204-makeflags/closefds.py
Normal file
12
t/204-makeflags/closefds.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import subprocess, sys, os
|
||||
|
||||
# subprocess.call(close_fds=True) is unfortunately not a good idea,
|
||||
# because some versions (Debian's python version?) try to close inordinately
|
||||
# many file descriptors, like 0..1000000, which takes a very long time.
|
||||
#
|
||||
# We happen to know that redo doesn't need such huge fd values, so we'll
|
||||
# just cheat and use a smaller range.
|
||||
os.closerange(3, 1024)
|
||||
rv = subprocess.call(sys.argv[1:])
|
||||
sys.exit(rv)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue