FD_MAX needs to start at 3 to be safe

This commit is contained in:
thespad
2024-12-23 21:11:35 +00:00
parent 2aeca57ad9
commit 5395e2d5a8
+1 -1
View File
@@ -256,7 +256,7 @@ run_mods() {
write_mod_debug "Mod script version ${MOD_SCRIPT_VER}"
mkdir -p /modcache
# Fetch internal fds
FD_MAX=0
FD_MAX=3
while IFS= read -r -d '' FD; do
if [[ $(cat "${FD}") -gt "${FD_MAX}" ]]; then
FD_MAX=$(cat "${FD}")