Fix ignored gzip exit status in GZCompressAction#715
Open
sahvx655-wq wants to merge 2 commits into
Open
Conversation
77cebbd to
252e83b
Compare
swebb2066
reviewed
Jun 9, 2026
swebb2066
left a comment
Contributor
There was a problem hiding this comment.
The are a number of usages of apr_proc_wait in the test cases as well. It would be appropriate to use SubProcessFailure::makeMessage it you are willing.
Contributor
Author
|
I have updated the implementation to use SubProcessFailure for subprocess exit handling and pushed the changes for review. |
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.
GZCompressAction::execute currently waits for the spawned gzip process using apr_proc_wait, but discards the child process exit status by passing NULL for the exit code parameter.
As a result, failures from the compression process are not explicitly detected before execution continues. This behavior differs from ZipCompressAction::execute, which retrieves and validates the child process exit status.
This patch updates GZCompressAction::execute to capture the exit status returned by apr_proc_wait and validate it before proceeding, aligning its behavior with the existing implementation in ZipCompressAction.
Impact
Improves error handling consistency for compression actions and ensures that gzip process failures are not silently ignored.
Proposed Changes
Retrieve the child process exit status in GZCompressAction::execute.
Validate the returned exit status before continuing.
Align gzip compression handling with the existing ZipCompressAction implementation.