SDL: Show the child process wait code instead of turning it into an error string

From 8b1e4aa41b1282f98726f37988790b1116b4ee02 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sun, 23 Aug 2026 10:32:18 -0700
Subject: [PATCH] Show the child process wait code instead of turning it into
 an error string

The exit code of the child process may not fit in 8 bits, it's more useful to provide the full child process status.

Fixes https://github.com/libsdl-org/SDL/issues/16188
---
 src/process/posix/SDL_posixprocess.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/process/posix/SDL_posixprocess.c b/src/process/posix/SDL_posixprocess.c
index 2d061f961291b..97be479d4d3ec 100644
--- a/src/process/posix/SDL_posixprocess.c
+++ b/src/process/posix/SDL_posixprocess.c
@@ -366,7 +366,7 @@ bool SDL_SYS_CreateProcessWithProperties(SDL_Process *process, SDL_PropertiesID
                 goto posix_spawn_fail_all;
             }
             if (status != 0) {
-                SDL_SetError("posix_spawn() failed: %s", strerror(status));
+                SDL_SetError("posix_spawn() failed: %d", status);
                 goto posix_spawn_fail_all;
             }
             break;