Repository navigation
Pass the pods to update as positional parameters, and end a job whose worker died silently - #5
Merged
Merged
Conversation
… 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.
…e body when it reports the kill
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 updategot 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/bashand/bin/zshthe 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.