Normalize Windows exit codes from unsigned to signed 32-bit

Issue: Negative exit codes are reported incorrectly on... (#39292 - closed) • Ashvin Sharma • 19.0

What does this MR do?

fix: normalize Windows exit codes from unsigned to signed 32-bit

Windows stores process exit codes as unsigned 32-bit integers (DWORD). When a script calls exit -1, Windows stores 0xFFFFFFFF (4294967295). Go's process APIs return this as a large positive int without reinterpreting the sign, so the runner was reporting -1 as 4294967295.

Why was this MR needed?

This MR was needed because exit code on Windows targets were showing incorrectly.

What's the best way to test this MR?

  1. Get a Windows EC2
  2. Install your patched binary
  3. Run this job:
test: 
  tags: [windows]
  script: 
    - exit -1
  1. Check the job log says exit status -1 not exit status 4294967295

What are the relevant issue numbers?

#39292 (closed)

Merge request reports

Loading