Repository navigation
Conversation
Emit Stop payloads with the shell builtin printf. On Ubuntu 26.04, uutils cat reopens a missing stdout on /dev/null and returns success, causing the hook to consume messages that were never delivered. Keep the existing write-status barrier and consume-after-success rule. The closed-stdout regression fails before this change and passes after it on Ubuntu 26.04; its expectations are unchanged.
Owner
Author
|
Landed on main in 1.6.0 (#1529). |
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.
On Ubuntu 26.04, a Stop-hook invocation with stdout closed could consume messages without delivering its payload. The installed uutils
cat0.10.0 reopens a missing fd 1 on/dev/nulland exits successfully, so the hook interpreted a discarded payload as a successful delivery.Emit the Stop payload with the shell builtin
printf, as the other emit paths already do. This preserves the JSON bytes and makes a closed stdout fail the write, leaving the messages unread. The existing regression and its expectations remain unchanged.Validation: reproduced the failure on Ubuntu 26.04/Bash 5.3.9 and traced
catobservingEBADFon fd 1, opening/dev/nullas fd 1, and exiting 0. The successful-delivery and closed-stdout regressions pass with the fix. Ubuntu 24.04/Bash 5.2 did not reproduce the original failure. The fulltests/test_delivery.batssuite completed with exit 0 on Ubuntu 26.04 as a non-root user withLANG=C.UTF-8(221 cases, 3 platform skips). The same 221-case file also completed with exit 0 on macOS.bash -n scripts/check-inbox.shandgit diff --checkpass.