Repository navigation
Conversation
Each batch item runs restore() in a subshell, which runs no EXIT trap, so verifier_restore never ran and the next item saved 0 as the old value. verifier_verify_adb_installs and package_verifier_enable stayed off. Turn the verifier off once in restore_batch and restore it there. Signed-off-by: ash-iir <254348575+ash-iir@users.noreply.github.com>
5 of 6 tasks
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.
restore()turns offverifier_verify_adb_installsandpackage_verifier_enableand relies on the EXIT trap (cleanup→verifier_restore) to put them back. Inrestore-batcheach item runsrestore()in a( … ) &subshell, which runs no EXIT trap, so they were never restored, and the second item saved0as the "old" value. After any batch restore, both settings stayed at 0.restore_batchcallsverifier_offonce before the loop andverifier_restoreafter it (the parent's EXIT trap still covers a kill).restore()skips its ownverifier_offwhenIN_BATCH=1.Testing
sh -non worker.sh.( … ) &subshell does not run the parent's EXIT trap.