Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: error due to out-of-range process exit code #339

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

ddneilson
Copy link
Contributor

Fixes: #338

What was the problem/requirement? (What/Why)

On Win32 systems we may receive process exit codes that are outside of the range of a 32-bit signed integer (as expected by UpdateWorkerAgent API), but in range of a 32-bit unsigned integer. This causes a validation error to be raised which the agent treats as an unrecoverable error and exits.

What was the solution? (How)

Convert all process exit codes to be in range of a 32-bit signed integer by casting the bits to the type.

What is the impact of this change?

The agent should no longer exit on Windows when it gets a process exit code that was not accounted for.

How was this change tested?

Unit tests have been added to ensure that the conversion is as expected.

Was this change documented?

N/A

Is this a breaking change?

No


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ddneilson ddneilson requested a review from a team as a code owner June 20, 2024 15:36
Problem:
On Win32 systems we may receive process exit codes that are outside of
the range of a 32-bit signed integer (as expected by UpdateWorkerAgent
API), but in range of a 32-bit unsigned integer. This causes a
validation error to be raised which the agent treats as an unrecoverable
error and exits.

Solution:
Convert all process exit codes to be in range of a 32-bit signed integer
by casting the bits to the type.

Signed-off-by: Daniel Neilson <53624638+ddneilson@users.noreply.github.com>
@ddneilson ddneilson enabled auto-merge (squash) June 20, 2024 16:03
@ddneilson ddneilson merged commit 7d4ec30 into aws-deadline:mainline Jun 20, 2024
12 checks passed
@ddneilson ddneilson deleted the issue_338 branch June 21, 2024 18:31
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.

Bug: Process exit code is out of range
3 participants