Fix run_for hanging, XML escaping on bash 3.2, and step's name clash

run_for stopped dns-sd with INT, which bash ignores in background jobs
started from a script, so it never returned. It uses TERM now.

xml_escape's ${s//&/\&} keeps the backslash on bash 3.2; it uses sed
now, in all three copies.

10-core.sh's step() replaced the smoketest runner's step(); it's
core_step now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
David Young
2026-11-11 11:54:55 -07:00
co-authored by Claude Opus 5.5
parent 5fd4fa5a98
commit 476237366a
5 changed files with 17 additions and 22 deletions
+3 -5
View File
@@ -65,11 +65,9 @@ remove_job() {
}
xml_escape() {
local s="$1"
s="${s//&/\&amp;}"
s="${s//</\&lt;}"
s="${s//>/\&gt;}"
printf '%s' "$s"
# sed, not ${s//&/\&amp;}: bash 3.2 keeps that backslash
printf '%s' "$1" | sed -e 's/&/\&amp;/g' -e 's/</\&lt;/g' -e 's/>/\&gt;/g' \
-e 's/"/\&quot;/g'
}
# Mount smb://[user@]host[/share] and record what was mounted. Without a