Skip to content

Pass the pods to update as positional parameters, and end a job whose worker died silently - #5

Merged
stackrats merged 2 commits into
mainfrom
fix/guest-shell-zsh
Sep 17, 2026
Merged

stackrats merged 2 commits into
mainfrom
fix/guest-shell-zsh

Conversation

@stackrats

Copy link
Copy Markdown
Owner

Both faults come from the same fact, which the earlier fixes had wrong: the guest job script is the ssh remote command, so the guest's login shell runs it, and on macOS that is zsh rather than /bin/sh.

CocoaPods retry. It passed the pod names as an unquoted parameter and relied on sh's word splitting. zsh does not split, so pod update got one argument holding the name and a trailing space, and CocoaPods refused it. The names are now built into positional parameters one line at a time and passed as "$@". The recipe's fixture test runs the script under each of /bin/sh, /bin/bash and /bin/zsh the host has, so the macOS runner covers zsh.

Job wrapper. zsh ends the worker subshell on an assignment or expansion error without running its EXIT trap, so no status was written and the reader, which waited only for the status file, hung forever. The reader now watches the worker's pid: once the worker is gone, a status it wrote is already in place, since the trap runs before exit; none means the shell skipped the trap or the worker was killed, and the reader records 1 with a line saying so. A new test kills the worker outright.

Both verified as the ssh remote command on the macOS guest against the affected project. The design record's ledger is corrected and extended.

… worker died silently

Both faults come from the same fact, which the earlier fixes had wrong: the
guest job script is the ssh remote command, so the guest's login shell runs
it, and on macOS that is zsh rather than /bin/sh.

The CocoaPods retry passed the pod names as an unquoted parameter and relied
on sh's word splitting. zsh does not split, so `pod update` got one argument
holding the name and a trailing space, and CocoaPods refused it. The names
are now built into positional parameters one line at a time and passed as
"$@", which every shell treats alike. The recipe's fixture test runs the
script under each of /bin/sh, /bin/bash and /bin/zsh the host has.

zsh also ends the worker subshell on an assignment or expansion error
without running its EXIT trap at all, so no status was written and the
wrapper's reader, which waited only for the status file, hung forever. The
reader now watches the worker's pid too: once the worker is gone, a status
it wrote is already in place, since the trap runs before exit; none means
the shell skipped the trap or the worker was killed, and the reader records
1 with a line saying so. A test kills the worker outright, which no shell's
trap survives.

Both verified as the ssh remote command on the guest.
@stackrats
stackrats merged commit f790f50 into main Sep 17, 2026
2 checks passed
@stackrats
stackrats deleted the fix/guest-shell-zsh branch September 17, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant